3v4l.org

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