3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $stack = array("orange", 'b' => "banana", 1000 => "apple", "raspberry"); $bb = array(); $aaa = array_merge($stack, $bb); var_dump($stack); var_dump($aaa);
based on bpdcC
Output for 5.3.20 - 7.2.0
array(4) { [0]=> string(6) "orange" ["b"]=> string(6) "banana" [1000]=> string(5) "apple" [1001]=> string(9) "raspberry" } array(4) { [0]=> string(6) "orange" ["b"]=> string(6) "banana" [1]=> string(5) "apple" [2]=> string(9) "raspberry" }