3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array1 = array(0 => 'zero_a', 2 => 'two_a', 3 => 'three_a'); $array2 = array(1 => 'one_b', 3 => 'three_b', 4 => 'four_b'); $result = array_merge_recursive($array1,$array2); var_dump($result);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(6) { [0]=> string(6) "zero_a" [1]=> string(5) "two_a" [2]=> string(7) "three_a" [3]=> string(5) "one_b" [4]=> string(7) "three_b" [5]=> string(6) "four_b" }