1 2 3 4 5 6 7
<?php $foo = array(); $foo = (object)$foo; var_dump($foo);
1 2
object(stdClass)#1 (0) { }