3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function objectToArray( $d ) { if (is_object($d)) { $d = get_object_vars($d); } if (is_array($d)) { return array_map(__FUNCTION__, $d); } else { return $d; } } var_dump(objectToArray(new stdclass)); ?>
Output for 4.3.0 - 7.1.0
array(0) { }