<?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 - 5.5.35, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.6 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.29, 8.2.0 - 8.2.21, 8.3.0 - 8.3.9
- array(2) {
[0]=>
array(1) {
["test"]=>
int(3)
}
[1]=>
array(1) {
["test2"]=>
int(3)
}
}
preferences:
218.33 ms | 406 KiB | 249 Q