3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $foo = array(1,2,3); $bar = $foo; $bar[] = 4; var_dump($foo); var_dump($bar);
based on I8K4l
Output for 4.3.0 - 7.1.7
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3) } array(4) { [0]=> int(1) [1]=> int(2) [2]=> int(3) [3]=> int(4) }