3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function objectToArray( $object ) { if( !is_object( $object ) && !is_array( $object ) ) { return $object; } if( is_object( $object ) ) { $object = get_object_vars( $object ); } return array_map( 'objectToArray', $object ); }
Output for 4.3.0 - 7.1.0