php create object without class
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/6384431/creating-anonymous-objects-in-php">Creating anonymous objects in php</a>  </p>
</blockquote>



<p>In JavaScript, you can easiliy create an object without a class by:</p>

<pre><code> myObj = {};
 myObj.abc = "aaaa";
</code></pre>

<p>For PHP I've found this one, but it is nearly 4 years old:
<a href="http://www.subclosure.com/php-creating-anonymous-objects-on-the-fly.html" rel="nofollow">http://www.subclosure.com/php-creating-anonymous-objects-on-the-fly.html</a></p>

<pre><code>$obj = (object) array('foo' =&gt; 'bar', 'property' =&gt; 'value');
</code></pre>

<p>Now with PHP 5.4 in 2013, is there an alternative to this?</p>

<p>Thanks alot in advance</p>

<p>Wolfgang</p>
