3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array(1, 2, 3); //$c = &$a[2]; $b = $a; $b[2] = 5; $b[0] = 10; print_r($a); print_r($b);
based on 4TU46
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0rc3
Array ( [0] => 1 [1] => 2 [2] => 3 ) Array ( [0] => 10 [1] => 2 [2] => 5 )