title: PHP write objects inline
body: <p>Im starting to move away from using arrays in PHP as objects are so much neater and in php 5 there is no performance hits when using objects.</p>
  
  <p>Currently the way I do it is:</p>
  
  <p><code>$object = (object) array('this' =&gt; 'that', 'foo' =&gt; (object) array('bar' =&gt; 123));</code></p>
  
  <p>However, i find it so tedious to have to typecast every time as typecasting isnt recursive...</p>
  
  <p>Is there any way in php (or will there be) to do it like this or something similar:</p>
  
  <pre><code>$object = {
      'this' =&gt; 'that',
      'foo' =&gt; {
          'bar' =&gt; 123
      }
  };
  </code></pre>