3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $x = new stdClass; $y = new stdClass; $y->foo = $x->foo = new stdClass; $xSer = serialize($x); $ySer = serialize($y); $x = unserialize($xSer); $y = unserialize($ySer); $x->foo->bar = 5; var_dump($y);
Output for 5.0.0 - 7.1.0
object(stdClass)#1 (1) { ["foo"]=> object(stdClass)#6 (0) { } }
Output for 4.3.0 - 4.4.9
object(stdClass)(1) { ["foo"]=> object(stdClass)(0) { } }