3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a=array( 'x'=>'111', 'y'=>'22', ); $b=array( 'x'=>'333' ); var_dump($a+$b, $b+$a, array_merge($a,$b),array_merge($b,$a));
Output for 4.3.0 - 7.2.0
array(2) { ["x"]=> string(3) "111" ["y"]=> string(2) "22" } array(2) { ["x"]=> string(3) "333" ["y"]=> string(2) "22" } array(2) { ["x"]=> string(3) "333" ["y"]=> string(2) "22" } array(2) { ["x"]=> string(3) "111" ["y"]=> string(2) "22" }