3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $x=array('a'=>1,'b'=>2); $y=array('c'=>3,'a'=>4); var_dump($x+$y); var_dump(array_merge($a,$b));
Output for 5.3.0 - 7.1.0
array(3) { ["a"]=> int(1) ["b"]=> int(2) ["c"]=> int(3) } Notice: Undefined variable: a in /in/kdACp on line 6 Notice: Undefined variable: b in /in/kdACp on line 6 Warning: array_merge(): Argument #1 is not an array in /in/kdACp on line 6 NULL
Output for 5.0.4 - 5.2.17
array(3) { ["a"]=> int(1) ["b"]=> int(2) ["c"]=> int(3) } Notice: Undefined variable: a in /in/kdACp on line 6 Notice: Undefined variable: b in /in/kdACp on line 6 Warning: array_merge(): Argument #1 is not an array in /in/kdACp on line 6 Warning: array_merge(): Argument #2 is not an array in /in/kdACp on line 6 NULL
Output for 5.0.0 - 5.0.3
array(3) { ["a"]=> int(1) ["b"]=> int(2) ["c"]=> int(3) } Notice: Undefined variable: a in /in/kdACp on line 6 Notice: Undefined variable: b in /in/kdACp on line 6 Warning: array_merge(): Argument #1 is not an array in /in/kdACp on line 6 Warning: array_merge(): Argument #2 is not an array in /in/kdACp on line 6 NULL
Output for 4.3.0 - 4.4.9
array(3) { ["a"]=> int(1) ["b"]=> int(2) ["c"]=> int(3) } Notice: Undefined variable: a in /in/kdACp on line 6 Notice: Undefined variable: b in /in/kdACp on line 6 array(0) { }