3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $o=(object)array();$o->o=$o;$o->p=(object)array();print_r($o);
based on 6a3dT
Output for 5.0.0 - 5.6.28, 7.0.0 - 7.1.0
stdClass Object ( [o] => stdClass Object *RECURSION* [p] => stdClass Object ( ) )
Output for hhvm-3.12.0
stdClass Object ( [o] => stdClass Object ( [o] => Array *RECURSION* [p] => stdClass Object ( ) ) [p] => stdClass Object ( ) )
Output for hhvm-3.10.0

Process exited with code 153.
Output for 4.3.0 - 4.4.9
stdClass Object ( [o] => stdClass Object ( ) [p] => stdClass Object ( ) )