3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $foo = new stdClass(); $foo->p = $foo; var_dump((array)$foo);
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.3.0beta1
array(1) { ["p"]=> object(stdClass)#1 (1) { ["p"]=> *RECURSION* } }
Output for hhvm-3.12.14 - 3.17.3
array(1) { ["p"]=> object(stdClass)#1 (1) { ["p"]=> object(stdClass)#1 (1) { ["p"]=> *RECURSION* } } }