# PHP Dynamic object (like in AS3)

**URL:** <https://forum.kirupa.com/t/php-dynamic-object-like-in-as3/309525>\
**Category:** programming\
**Created:** [May 17, 2010, 4:33pm UTC](https://forum.kirupa.com/t/php-dynamic-object-like-in-as3/309525 "2010-05-17T16:33:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![IQAndreas](https://avatars.discourse-cdn.com/v4/letter/i/f08c70/32.png) [@IQAndreas](https://forum.kirupa.com/u/IQAndreas)\
**Post date:** [May 17, 2010, 4:33pm UTC](https://forum.kirupa.com/t/php-dynamic-object-like-in-as3/309525/1 "2010-05-17T16:33:02Z")

</div>

I can’t seem to find what I’m looking for. Perhaps it is really an array with strings as keys.

How do I create and set values for dynamic objects, like this in AS3:  
_var myObject = {prop1:“value”, yeardays:365, special:777};_

I want the kind of object like the one returned by a MySQL query, and can get and set properties like this:  
_$myObject-\>id;  
$myObject-\>value = “sdfdfgfg”;_

Anyone at least have a name I can find this by?  
Is it possible to create these objects shorthand like with the AS3’s curly brackets? _{object:value}_
