3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array(); $a['test'] = array(1,2); $b = $a['test']; $b[0] = 3; $c = $a; $c['test'][1] = 3; print_r($a); print_r($b); print_r($c);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [test] => Array ( [0] => 1 [1] => 2 ) ) Array ( [0] => 3 [1] => 2 ) Array ( [test] => Array ( [0] => 1 [1] => 3 ) )