If in doubt, consult the documentation . The behavior is different from array_merge: array_merge adds / overwrites, + only adds.
Example:
<?php $a = Array('foo'=>'bar','baz'=>'quux'); $b = Array('foo'=>'something else','xyzzy'=>'aaaa'); $c = $a + $b; $d = array_merge($a,$b); print_r($c); print_r($d);
Conclusion - as you can see, array_merge overwritten the value from $ a ['foo'] with $ b ['foo']; $ a + $ b:
Array ( [foo] => bar [baz] => quux [xyzzy] => aaaa ) Array ( [foo] => something else [baz] => quux [xyzzy] => aaaa )
source share