3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array(-1 => 'none'); $b = array(15 => '15 sec', 30 => '30 sec', 60 => '1 min'); var_dump(array_merge($a, $b)); var_dump($a + $b);
based on d6G19
Output for 4.3.0 - 7.2.0
array(4) { [0]=> string(4) "none" [1]=> string(6) "15 sec" [2]=> string(6) "30 sec" [3]=> string(5) "1 min" } array(4) { [-1]=> string(4) "none" [15]=> string(6) "15 sec" [30]=> string(6) "30 sec" [60]=> string(5) "1 min" }