3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = [[1, 2], [1, 2]]; $a["b"] = [1, 3]; $a["a"] = [1, 3]; $a[5] = [1, 3]; $b = ""; if (strlen($b)) echo "1\n\n\n"; array_unshift($a, [3, 4]); print_r($a);
based on YGmVj
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.2.6
Array ( [0] => Array ( [0] => 3 [1] => 4 ) [1] => Array ( [0] => 1 [1] => 2 ) [2] => Array ( [0] => 1 [1] => 2 ) [b] => Array ( [0] => 1 [1] => 3 ) [a] => Array ( [0] => 1 [1] => 3 ) [3] => Array ( [0] => 1 [1] => 3 ) )