3v4l.org

run code in 200+ 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 - 7.1.7
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