In PHP, you can initialize arrays with values quickly using the following notation:
$array = array("name" => "member 1", array("name" => "member 1.1") ) ....
To initialize objects, use STDClass
$object = new STDClass();
To quickly initialize objects like arrays, we can do:
$object = (object) array("name" => "member 1", array("name" => "member 1.1") );
What do you think?