3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $arr1[0] = array('foo'=>'bar'); $arr2[0] = array('foo'=>'notbar'); $result = array_merge($array1, $array2); print_r($result);
Output for 5.3.0 - 7.1.0
Notice: Undefined variable: array1 in /in/YnPlN on line 4 Notice: Undefined variable: array2 in /in/YnPlN on line 4 Warning: array_merge(): Argument #1 is not an array in /in/YnPlN on line 4
Output for 5.0.4 - 5.2.17
Notice: Undefined variable: array1 in /in/YnPlN on line 4 Notice: Undefined variable: array2 in /in/YnPlN on line 4 Warning: array_merge(): Argument #1 is not an array in /in/YnPlN on line 4 Warning: array_merge(): Argument #2 is not an array in /in/YnPlN on line 4
Output for 5.0.0 - 5.0.3
Notice: Undefined variable: array1 in /in/YnPlN on line 4 Notice: Undefined variable: array2 in /in/YnPlN on line 4 Warning: array_merge(): Argument #1 is not an array in /in/YnPlN on line 4 Warning: array_merge(): Argument #2 is not an array in /in/YnPlN on line 4
Output for 4.3.0 - 4.4.9
Notice: Undefined variable: array1 in /in/YnPlN on line 4 Notice: Undefined variable: array2 in /in/YnPlN on line 4 Array ( )