Autocreate object when property is called
<p>Im wondering if there is a way to autocreate object if a property is called. An example:</p>

<pre><code>&lt;?php
  echo $myObj-&gt;myProperty
?&gt;
</code></pre>

<p>This code will of course fail because i did not initiate $myObj before reading the property.
What im looking for is a way to automaticly initiate $myObj based on "myObj".</p>

<p>Something like:</p>

<pre><code>&lt;?php
class myObj {
  public myProperty = 'BlaBla';
}
echo $myObj-&gt;myProperty; //outputs BlaBla instead of failing
?&gt;
</code></pre>

<p>I know about __autoload($classname) but that only works of initiating classcode with i.e. an include(), so that is not what im after.</p>
