3v4l.org

run code in 200+ PHP versions simultaneously
<?php $a = array( 1 => array( 'test' => 3 ) ); $b = array( 1 => array( 'test2' => 3 ) ); $c = array_merge_recursive( $a, $b ); var_dump( $c );
Output for 5.5.0 - 7.4.0
array(2) { [0]=> array(1) { ["test"]=> int(3) } [1]=> array(1) { ["test2"]=> int(3) } }