I would like to be able to do the following:
$obj = new stdClass; $obj->status = \"success\"; $obj2 = new stdClass; $obj2->message = \"OK\";
This is more along the lines of they way that you didn't want to do it....
$extended = (object) array_merge((array)$obj, (array)$obj2);
However I think that would be a little better than having to iterate over the properties.