<?php $obj = (object) array('foo' => 'bar', 'property' => 'value'); echo $obj->foo; // prints 'bar' echo $obj->property; // prints 'value' ?>