3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $b = "hello"; $x = array(); $x[0] =& $b; $x[1] =& $b; $y = unserialize(serialize($x)); $y[0] = 'world'; $x[0] = 'world'; var_dump($x); var_dump($y);
Output for 4.3.0 - 7.1.0
array(2) { [0]=> &string(5) "world" [1]=> &string(5) "world" } array(2) { [0]=> &string(5) "world" [1]=> &string(5) "world" }