php get all in object as array

95

php get all in object as array -

$object = new StdClass;
$object->foo = 1;
$object->bar = 2;

var_dump( (array) $object );

Comments

Submit
0 Comments