array_merge discards the original numeric key, retains the key in string form, and then forms a new array. No matter whether the key name
is the same, it will not be merged, unless the key name and value are the same at the same time and must be in string form. keys are merged. The thing about array+array is that no matter what your situation is, it will only put the data of the previous array into the newly generated array first, and then see if the second array is larger than the first array. If there are many, more will be added in. It only counts the number, but in this case it will be added in:
$a = array('d'=>'aass','e'=>'adsdfd', 'asd'=>'asdsdd','ddfg'=>'dssdf');
$b = array('d'=>'adddd','adsdfd','asdfsddddd','d'=>'aass' );
$d = $a + $b;
var_dump($d);
var_dump($e);Print: array 'd' => string'aass ' (length=4) 'e' => string'adsdfd'
(length=6) 'asd' => string'asdsdd' (length=6) 'ddfg' => string'dssdf' (length=5) 0
=> string'adsdfd' (length=6) 1 => string'asdfsddddd' (length=10)array 'd' => string'aass' (length=4) 'e' => string'adsdfd'
(length=6) 'asd' => string'asdsdd' (length=6) 'ddfg' => string'dssdf' (length=5) 0
=> string'adsdfd' (length=6) 1 => string'asdfsddddd' (length=10)