3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array1 = array( 1 => array('stuff'), 2 => array('stuff'), ); $array2 = array( 1 => array('other stuff'), 3 => array('other stuff'), ); print_r(array_merge($array1, $array2)); print_r($array1 + $array2);
Output for 4.3.0 - 7.3.0rc4
Array ( [0] => Array ( [0] => stuff ) [1] => Array ( [0] => stuff ) [2] => Array ( [0] => other stuff ) [3] => Array ( [0] => other stuff ) ) Array ( [1] => Array ( [0] => stuff ) [2] => Array ( [0] => stuff ) [3] => Array ( [0] => other stuff ) )