3v4l.org

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