3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $o=(object)array();$o->o=$o;$o->p=(object)array();var_dump($o);
based on 7oOJO
Output for 5.2.14 - 5.2.17, 5.3.3 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
object(stdClass)#1 (2) { ["o"]=> *RECURSION* ["p"]=> object(stdClass)#2 (0) { } }
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.0.0 - 5.2.13, 5.3.0 - 5.3.2
object(stdClass)#1 (2) { ["o"]=> object(stdClass)#1 (2) { ["o"]=> *RECURSION* ["p"]=> object(stdClass)#2 (0) { } } ["p"]=> object(stdClass)#2 (0) { } }
Output for 4.3.0 - 4.4.9
object(stdClass)(2) { ["o"]=> object(stdClass)(0) { } ["p"]=> object(stdClass)(0) { } }