3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array(); $a['test'] = array(1,2); $a['test'] = $b[0]; $b[0] = 3; $c = $a; $c['test'][1] = 3; print_r($a); print_r($b); print_r($c);
Output for 5.0.4 - 7.1.0
Notice: Undefined variable: b in /in/dYItt on line 5 Array ( [test] => ) Array ( [0] => 3 ) Array ( [test] => Array ( [1] => 3 ) )
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: b in /in/dYItt on line 5 Array ( [test] => ) Array ( [0] => 3 ) Array ( [test] => Array ( [1] => 3 ) )