3v4l.org

run code in 150+ 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 - 5.6.28, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.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" }