3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr1 = Array( [0] => 2281, [1] => 2292, [2] => 2293, [3] => 2294, [4] => 2295, [5] => 2301, [6] => 2302, [7] => 2303, [8] => 2661, [9] => 2415, [10] => 2416, [11] => 2417, [12] => 2418 ); $arr2 = Array( [0] => 2281, [1] => 2292, [2] => 2293, [3] => 2294, [4] => 2295, [5] => 2301, [6] => 2302, [7] => 2303, [8] => 2661, [9] => 2415, [10] => 2416, [11] => 2417, [12] => 2418 ); $result = array_merge($arr1, $arr2); print_r($result);
based on Qh6Kh
Output for 7.0.0 - 7.0.2
Fatal error: Illegal offset type in /in/C4AHY on line 4
Process exited with code 255.
Output for 5.4.11 - 5.6.28
Warning: Illegal offset type in /in/C4AHY on line 4 Warning: Illegal offset type in /in/C4AHY on line 5 Warning: Illegal offset type in /in/C4AHY on line 6 Warning: Illegal offset type in /in/C4AHY on line 7 Warning: Illegal offset type in /in/C4AHY on line 8 Warning: Illegal offset type in /in/C4AHY on line 9 Warning: Illegal offset type in /in/C4AHY on line 10 Warning: Illegal offset type in /in/C4AHY on line 11 Warning: Illegal offset type in /in/C4AHY on line 12 Warning: Illegal offset type in /in/C4AHY on line 13 Warning: Illegal offset type in /in/C4AHY on line 14 Warning: Illegal offset type in /in/C4AHY on line 15 Warning: Illegal offset type in /in/C4AHY on line 17 Warning: Illegal offset type in /in/C4AHY on line 20 Warning: Illegal offset type in /in/C4AHY on line 21 Warning: Illegal offset type in /in/C4AHY on line 22 Warning: Illegal offset type in /in/C4AHY on line 23 Warning: Illegal offset type in /in/C4AHY on line 24 Warning: Illegal offset type in /in/C4AHY on line 25 Warning: Illegal offset type in /in/C4AHY on line 26 Warning: Illegal offset type in /in/C4AHY on line 27 Warning: Illegal offset type in /in/C4AHY on line 28 Warning: Illegal offset type in /in/C4AHY on line 29 Warning: Illegal offset type in /in/C4AHY on line 30 Warning: Illegal offset type in /in/C4AHY on line 31 Warning: Illegal offset type in /in/C4AHY on line 33 Array ( )
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected '[', expecting ')' in /in/C4AHY on line 4
Process exited with code 255.