3v4l.org

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