3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a=array('a'=>1); $a=array('a'=>2); var_dump(array_merge($a,$b), array_merge($b,$a));
Output for 5.5.0 - 5.6.28, 7.0.0 - 7.1.0
Notice: Undefined variable: b in /in/ML402 on line 4 Warning: array_merge(): Argument #2 is not an array in /in/ML402 on line 4 Notice: Undefined variable: b in /in/ML402 on line 4 Warning: array_merge(): Argument #1 is not an array in /in/ML402 on line 4 NULL NULL
Output for hhvm-3.10.0 - 3.12.0
Notice: Undefined variable: b in /in/ML402 on line 4 Warning: Invalid operand type was used: expects array(s) in /in/ML402 on line 4 Notice: Undefined variable: b in /in/ML402 on line 4 Warning: array_merge() expects parameter 1 to be array, null given in /in/ML402 on line 4 NULL NULL
Output for 5.2.3 - 5.4.45
Warning: array_merge(): Argument #2 is not an array in /in/ML402 on line 4 Warning: array_merge(): Argument #1 is not an array in /in/ML402 on line 4 NULL NULL
Output for 5.0.0 - 5.2.2
<br /> <b>Warning</b>: array_merge() [<a href='function.array-merge'>function.array-merge</a>]: Argument #2 is not an array in <b>/in/ML402</b> on line <b>4</b><br /> <br /> <b>Warning</b>: array_merge() [<a href='function.array-merge'>function.array-merge</a>]: Argument #1 is not an array in <b>/in/ML402</b> on line <b>4</b><br /> NULL NULL
Output for 4.3.0 - 4.4.9
array(1) { ["a"]=> int(2) } array(1) { ["a"]=> int(2) }