title: Why my php class does not save it's property?
body: <p>Consider this sample code </p>
  
  <pre><code>&lt;?php
  class MyAwesomeClass {
      public $myawesomeproperty = 'test';
  
      public function __construct() {
          $self = new stdClass();
  
          $self-&gt;myawesomeproperty = "hello guys!";
      }
  }
  
  $test_obj = new MyAwesomeClass();
  
  echo '&lt;pre&gt;';
  var_export( $test_obj );
  echo '&lt;/pre&gt;';
  ?&gt;
  </code></pre>
  
  <p>It's supposed to set "myawesomeproperty" to a new string so var_export shows "hello guys!" in the output.</p>
  
  <p>What I'm actually getting is </p>
  
  <pre><code>MyAwesomeClass::__set_state(array(
     'myawesomeproperty' =&gt; 'test',
  ))
  </code></pre>
  
  <p>Apparently the construct function does not save anything to actual object.</p>
  
  <p>Why is this happening? What am I missing?</p>