3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a1 = range(2, 4048, 2); $a2 = range(4, 8096, 4); $a3 = array_diff($a1, $a2); print_r($a3);
Output for 5.0.0 - 5.6.28, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
Array ( [0] => 2 [2] => 6 [4] => 10 [6] => 14 [8] => 18 [10] => 22 [12] => 26 [14] => 30 [16] => 34 [18] => 38 [20] => 42 [22] => 46 [24] => 50 [26] => 54 [28] => 58 [30] => 62 [32] => 66 [34] => 70 [36] => 74 [38] => 78 [40] => 82 [42] => 86 [44] => 90 [46] => 94 [48] => 98 [50] => 102 [52] => 106 [54] => 110 [56] => 114 [58] => 118 [60] => 122 [62] => 126 [64] => 130 [66] => 134 [68] => 138 [70] => 142 [72] => 146 [74] => 150 [76] => 154 [78] => 158 [80] => 162 [82] => 166 [84] => 170 [86] => 174 [88] => 178 [90] => 182 [92] => 186 [94] => 190 [96] => 194 [98] => 198 [100] => 202 [102] => 206 [104] => 210 [106] => 214 [108] => 218 [110] => 222 [112] => 226 [114] => 230 [116] => 234 [118] => 238 [120] => 242 [122] => 246 [124] => 250 [126] => 254 [128] => 258 [130] => 262 [132] => 266 [134] => 270 [136] => 274 [138] => 278 [140] => 282 [142] => 286 [144] => 290 [146] => 294 [148] => 298 [150] => 302 [152] => 306 [154] => 310 [156] => 314 [158] => 318 [160] => 322 [162] => 326 [164] => 330 [166] => 334 [168] => 338 [170] => 342 [172] => 346 [174] => 350 [176] => 354 [178] => 358 [180] => 362 [182] => 366 [184] => 370 [186] => 374 [188] => 378 [190] => 382 [192] => 386 [194] => 390 [196] => 394 [198] => 398 [200] => 402 [202] => 406 [204] => 410 [206] => 414 [208] => 418 [210] => 422 [212] => 426 [214] => 430 [216] => 434 [218] => 438 [220] => 442 [222] => 446 [224] => 450 [226] => 454 [228] => 458 [230] => 462 [232] => 466 [234] => 470 [236] => 474 [238] => 478 [240] => 482 [242] => 486 [244] => 490 [246] => 494 [248] => 498 [250] => 502 [252] => 506 [254] => 510 [256] => 514 [258] => 518 [260] => 522 [262] => 526 [264] => 530 [266] => 534 [268] => 538 [270] => 542 [272] => 546 [274] => 550 [276] => 554 [278] => 558 [280] => 562 [282] => 566 [284] => 570 [286] => 574 [288] => 578 [290] => 582 [292] => 586 [294] => 590 [296] => 594 [298] => 598 [300] => 602 [302] => 606 [304] => 610 [306] => 614 [308] => 618 [310] => 622 [312] => 626 [314] => 630 [316] => 634 [318] => 638 [320] => 642 [322] => 646 [324] => 650 [326] => 654 [328] => 658 [330] => 662 [332] => 666 [334] => 670 [336] => 674 [338] => 678 [340] => 682 [342] => 686 [344] => 690 [346] => 694 [348] => 698 [350] => 702 [352] => 706 [354] => 710 [356] => 714 [358] => 718 [360] => 722 [362] => 726 [364] => 730 [366] => 734 [368] => 738 [370] => 742 [372] => 746 [374] => 750 [376] => 754 [378] => 758 [380] => 762 [382] => 766 [384] => 770 [386] => 774 [388] => 778 [390] => 782 [392] => 786 [394] => 790 [396] => 794 [398] => 798 [400] => 802 [402] => 806 [404] => 810 [406] => 814 [408] => 818 [410] => 822 [412] => 826 [414] => 830 [416] => 834 [418] => 838 [420] => 842 [422] => 846 [424] => 850 [426] => 854 [428] => 858 [430] => 862 [432] => 866 [434] => 870 [436] => 874 [438] => 878 [440] => 882 [442] => 886 [444] => 890 [446] => 894 [448] => 898 [450] => 902 [452] => 906 [454] => 910 [456] => 914 [458] => 918 [460] => 922 [462] => 926 [464] => 930 [466] => 934 [468] => 938 [470] => 942 [472] => 946 [474] => 950 [476] => 954 [478] => 958 [480] => 962 [482] => 966 [484] => 970 [486] => 974 [488] => 978 [490] => 982 [492] => 986 [494] => 990 [496] => 994 [498] => 998 [500] => 1002 [502] => 1006 [504] => 1010 [506] => 1014 [508] => 1018 [510] => 1022 [512] => 1026 [514] => 1030 [516] => 1034 [518] => 1038 [520] => 1042 [522] => 1046 [524] => 1050 [526] => 1054 [528] => 1058 [530] => 1062 [532] => 1066 [534] => 1070 [536] => 1074 [538] => 1078 [540] => 1082 [542] => 1086 [544] => 1090 [546] => 1094 [548] => 1098 [550] => 1102 [552] => 1106 [554] => 1110 [556] => 1114 [558] => 1118 [560] => 1122 [562] => 1126 [564] => 1130 [566] => 1134 [568] => 1138 [570] => 1142 [572] => 1146 [574] => 1150 [576] => 1154 [578] => 1158 [580] => 1162 [582] => 1166 [584] => 1170 [586] => 1174 [588] => 1178 [590] => 1182 [592] => 1186 [594] => 1190 [596] => 1194 [598] => 1198 [600] => 1202 [602] => 1206 [604] => 1210 [606] => 1214 [608] => 1218 [610] => 1222 [612] => 1226 [614] => 1230 [616] => 1234 [618] => 1238 [620] => 1242 [622] => 1246 [624] => 1250 [626] => 1254 [628] => 1258 [630] => 1262 [632] => 1266 [634] => 1270 [636] => 1274 [638] => 1278 [640] => 1282 [642] => 1286 [644] => 1290 [646] => 1294 [648] => 1298 [650] => 1302 [652] => 1306 [654] => 1310 [656] => 1314 [658] => 1318 [660] => 1322 [662] => 1326 [664] => 1330 [666] => 1334 [668] => 1338 [670] => 1342 [672] => 1346 [674] => 1350 [676] => 1354 [678] => 1358 [680] => 1362 [682] => 1366 [684] => 1370 [686] => 1374 [688] => 1378 [690] => 1382 [692] => 1386 [694] => 1390 [696] => 1394 [698] => 1398 [700] => 1402 [702] => 1406 [704] => 1410 [706] => 1414 [708] => 1418 [710] => 1422 [712] => 1426 [714] => 1430 [716] => 1434 [718] => 1438 [720] => 1442 [722] => 1446 [724] => 1450 [726] => 1454 [728] => 1458 [730] => 1462 [732] => 1466 [734] => 1470 [736] => 1474 [738] => 1478 [740] => 1482 [742] => 1486 [744] => 1490 [746] => 1494 [748] => 1498 [750] => 1502 [752] => 1506 [754] => 1510 [756] => 1514 [758] => 1518 [760] => 1522 [762] => 1526 [764] => 1530 [766] => 1534 [768] => 1538 [770] => 1542 [772] => 1546 [774] => 1550 [776] => 1554 [778] => 1558 [780] => 1562 [782] => 1566 [784] => 1570 [786] => 1574 [788] => 1578 [790] => 1582 [792] => 1586 [794] => 1590 [796] => 1594 [798] => 1598 [800] => 1602 [802] => 1606 [804] => 1610 [806] => 1614 [808] => 1618 [810] => 1622 [812] => 1626 [814] => 1630 [816] => 1634 [818] => 1638 [820] => 1642 [822] => 1646 [824] => 1650 [826] => 1654 [828] => 1658 [830] => 1662 [832] => 1666 [834] => 1670 [836] => 1674 [838] => 1678 [840] => 1682 [842] => 1686 [844] => 1690 [846] => 1694 [848] => 1698 [850] => 1702 [852] => 1706 [854] => 1710 [856] => 1714 [858] => 1718 [860] => 1722 [862] => 1726 [864] => 1730 [866] => 1734 [868] => 1738 [870] => 1742 [872] => 1746 [874] => 1750 [876] => 1754 [878] => 1758 [880] => 1762 [882] => 1766 [884] => 1770 [886] => 1774 [888] => 1778 [890] => 1782 [892] => 1786 [894] => 1790 [896] => 1794 [898] => 1798 [900] => 1802 [902] => 1806 [904] => 1810 [906] => 1814 [908] => 1818 [910] => 1822 [912] => 1826 [914] => 1830 [916] => 1834 [918] => 1838 [920] => 1842 [922] => 1846 [924] => 1850 [926] => 1854 [928] => 1858 [930] => 1862 [932] => 1866 [934] => 1870 [936] => 1874 [938] => 1878 [940] => 1882 [942] => 1886 [944] => 1890 [946] => 1894 [948] => 1898 [950] => 1902 [952] => 1906 [954] => 1910 [956] => 1914 [958] => 1918 [960] => 1922 [962] => 1926 [964] => 1930 [966] => 1934 [968] => 1938 [970] => 1942 [972] => 1946 [974] => 1950 [976] => 1954 [978] => 1958 [980] => 1962 [982] => 1966 [984] => 1970 [986] => 1974 [988] => 1978 [990] => 1982 [992] => 1986 [994] => 1990 [996] => 1994 [998] => 1998 [1000] => 2002 [1002] => 2006 [1004] => 2010 [1006] => 2014 [1008] => 2018 [1010] => 2022 [1012] => 2026 [1014] => 2030 [1016] => 2034 [1018] => 2038 [1020] => 2042 [1022] => 2046 [1024] => 2050 [1026] => 2054 [1028] => 2058 [1030] => 2062 [1032] => 2066 [1034] => 2070 [1036] => 2074 [1038] => 2078 [1040] => 2082 [1042] => 2086 [1044] => 2090 [1046] => 2094 [1048] => 2098 [1050] => 2102 [1052] => 2106 [1054] => 2110 [1056] => 2114 [1058] => 2118 [1060] => 2122 [1062] => 2126 [1064] => 2130 [1066] => 2134 [1068] => 2138 [1070] => 2142 [1072] => 2146 [1074] => 2150 [1076] => 2154 [1078] => 2158 [1080] => 2162 [1082] => 2166 [1084] => 2170 [1086] => 2174 [1088] => 2178 [1090] => 2182 [1092] => 2186 [1094] => 2190 [1096] => 2194 [1098] => 2198 [1100] => 2202 [1102] => 2206 [1104] => 2210 [1106] => 2214 [1108] => 2218 [1110] => 2222 [1112] => 2226 [1114] => 2230 [1116] => 2234 [1118] => 2238 [1120] => 2242 [1122] => 2246 [1124] => 2250 [1126] => 2254 [1128] => 2258 [1130] => 2262 [1132] => 2266 [1134] => 2270 [1136] => 2274 [1138] => 2278 [1140] => 2282 [1142] => 2286 [1144] => 2290 [1146] => 2294 [1148] => 2298 [1150] => 2302 [1152] => 2306 [1154] => 2310 [1156] => 2314 [1158] => 2318 [1160] => 2322 [1162] => 2326 [1164] => 2330 [1166] => 2334 [1168] => 2338 [1170] => 2342 [1172] => 2346 [1174] => 2350 [1176] => 2354 [1178] => 2358 [1180] => 2362 [1182] => 2366 [1184] => 2370 [1186] => 2374 [1188] => 2378 [1190] => 2382 [1192] => 2386 [1194] => 2390 [1196] => 2394 [1198] => 2398 [1200] => 2402 [1202] => 2406 [1204] => 2410 [1206] => 2414 [1208] => 2418 [1210] => 2422 [1212] => 2426 [1214] => 2430 [1216] => 2434 [1218] => 2438 [1220] => 2442 [1222] => 2446 [1224] => 2450 [1226] => 2454 [1228] => 2458 [1230] => 2462 [1232] => 2466 [1234] => 2470 [1236] => 2474 [1238] => 2478 [1240] => 2482 [1242] => 2486 [1244] => 2490 [1246] => 2494 [1248] => 2498 [1250] => 2502 [1252] => 2506 [1254] => 2510 [1256] => 2514 [1258] => 2518 [1260] => 2522 [1262] => 2526 [1264] => 2530 [1266] => 2534 [1268] => 2538 [1270] => 2542 [1272] => 2546 [1274] => 2550 [1276] => 2554 [1278] => 2558 [1280] => 2562 [1282] => 2566 [1284] => 2570 [1286] => 2574 [1288] => 2578 [1290] => 2582 [1292] => 2586 [1294] => 2590 [1296] => 2594 [1298] => 2598 [1300] => 2602 [1302] => 2606 [1304] => 2610 [1306] => 2614 [1308] => 2618 [1310] => 2622 [1312] => 2626 [1314] => 2630 [1316] => 2634 [1318] => 2638 [1320] => 2642 [1322] => 2646 [1324] => 2650 [1326] => 2654 [1328] => 2658 [1330] => 2662 [1332] => 2666 [1334] => 2670 [1336] => 2674 [1338] => 2678 [1340] => 2682 [1342] => 2686 [1344] => 2690 [1346] => 2694 [1348] => 2698 [1350] => 2702 [1352] => 2706 [1354] => 2710 [1356] => 2714 [1358] => 2718 [1360] => 2722 [1362] => 2726 [1364] => 2730 [1366] => 2734 [1368] => 2738 [1370] => 2742 [1372] => 2746 [1374] => 2750 [1376] => 2754 [1378] => 2758 [1380] => 2762 [1382] => 2766 [1384] => 2770 [1386] => 2774 [1388] => 2778 [1390] => 2782 [1392] => 2786 [1394] => 2790 [1396] => 2794 [1398] => 2798 [1400] => 2802 [1402] => 2806 [1404] => 2810 [1406] => 2814 [1408] => 2818 [1410] => 2822 [1412] => 2826 [1414] => 2830 [1416] => 2834 [1418] => 2838 [1420] => 2842 [1422] => 2846 [1424] => 2850 [1426] => 2854 [1428] => 2858 [1430] => 2862 [1432] => 2866 [1434] => 2870 [1436] => 2874 [1438] => 2878 [1440] => 2882 [1442] => 2886 [1444] => 2890 [1446] => 2894 [1448] => 2898 [1450] => 2902 [1452] => 2906 [1454] => 2910 [1456] => 2914 [1458] => 2918 [1460] => 2922 [1462] => 2926 [1464] => 2930 [1466] => 2934 [1468] => 2938 [1470] => 2942 [1472] => 2946 [1474] => 2950 [1476] => 2954 [1478] => 2958 [1480] => 2962 [1482] => 2966 [1484] => 2970 [1486] => 2974 [1488] => 2978 [1490] => 2982 [1492] => 2986 [1494] => 2990 [1496] => 2994 [1498] => 2998 [1500] => 3002 [1502] => 3006 [1504] => 3010 [1506] => 3014 [1508] => 3018 [1510] => 3022 [1512] => 3026 [1514] => 3030 [1516] => 3034 [1518] => 3038 [1520] => 3042 [1522] => 3046 [1524] => 3050 [1526] => 3054 [1528] => 3058 [1530] => 3062 [1532] => 3066 [1534] => 3070 [1536] => 3074 [1538] => 3078 [1540] => 3082 [1542] => 3086 [1544] => 3090 [1546] => 3094 [1548] => 3098 [1550] => 3102 [1552] => 3106 [1554] => 3110 [1556] => 3114 [1558] => 3118 [1560] => 3122 [1562] => 3126 [1564] => 3130 [1566] => 3134 [1568] => 3138 [1570] => 3142 [1572] => 3146 [1574] => 3150 [1576] => 3154 [1578] => 3158 [1580] => 3162 [1582] => 3166 [1584] => 3170 [1586] => 3174 [1588] => 3178 [1590] => 3182 [1592] => 3186 [1594] => 3190 [1596] => 3194 [1598] => 3198 [1600] => 3202 [1602] => 3206 [1604] => 3210 [1606] => 3214 [1608] => 3218 [1610] => 3222 [1612] => 3226 [1614] => 3230 [1616] => 3234 [1618] => 3238 [1620] => 3242 [1622] => 3246 [1624] => 3250 [1626] => 3254 [1628] => 3258 [1630] => 3262 [1632] => 3266 [1634] => 3270 [1636] => 3274 [1638] => 3278 [1640] => 3282 [1642] => 3286 [1644] => 3290 [1646] => 3294 [1648] => 3298 [1650] => 3302 [1652] => 3306 [1654] => 3310 [1656] => 3314 [1658] => 3318 [1660] => 3322 [1662] => 3326 [1664] => 3330 [1666] => 3334 [1668] => 3338 [1670] => 3342 [1672] => 3346 [1674] => 3350 [1676] => 3354 [1678] => 3358 [1680] => 3362 [1682] => 3366 [1684] => 3370 [1686] => 3374 [1688] => 3378 [1690] => 3382 [1692] => 3386 [1694] => 3390 [1696] => 3394 [1698] => 3398 [1700] => 3402 [1702] => 3406 [1704] => 3410 [1706] => 3414 [1708] => 3418 [1710] => 3422 [1712] => 3426 [1714] => 3430 [1716] => 3434 [1718] => 3438 [1720] => 3442 [1722] => 3446 [1724] => 3450 [1726] => 3454 [1728] => 3458 [1730] => 3462 [1732] => 3466 [1734] => 3470 [1736] => 3474 [1738] => 3478 [1740] => 3482 [1742] => 3486 [1744] => 3490 [1746] => 3494 [1748] => 3498 [1750] => 3502 [1752] => 3506 [1754] => 3510 [1756] => 3514 [1758] => 3518 [1760] => 3522 [1762] => 3526 [1764] => 3530 [1766] => 3534 [1768] => 3538 [1770] => 3542 [1772] => 3546 [1774] => 3550 [1776] => 3554 [1778] => 3558 [1780] => 3562 [1782] => 3566 [1784] => 3570 [1786] => 3574 [1788] => 3578 [1790] => 3582 [1792] => 3586 [1794] => 3590 [1796] => 3594 [1798] => 3598 [1800] => 3602 [1802] => 3606 [1804] => 3610 [1806] => 3614 [1808] => 3618 [1810] => 3622 [1812] => 3626 [1814] => 3630 [1816] => 3634 [1818] => 3638 [1820] => 3642 [1822] => 3646 [1824] => 3650 [1826] => 3654 [1828] => 3658 [1830] => 3662 [1832] => 3666 [1834] => 3670 [1836] => 3674 [1838] => 3678 [1840] => 3682 [1842] => 3686 [1844] => 3690 [1846] => 3694 [1848] => 3698 [1850] => 3702 [1852] => 3706 [1854] => 3710 [1856] => 3714 [1858] => 3718 [1860] => 3722 [1862] => 3726 [1864] => 3730 [1866] => 3734 [1868] => 3738 [1870] => 3742 [1872] => 3746 [1874] => 3750 [1876] => 3754 [1878] => 3758 [1880] => 3762 [1882] => 3766 [1884] => 3770 [1886] => 3774 [1888] => 3778 [1890] => 3782 [1892] => 3786 [1894] => 3790 [1896] => 3794 [1898] => 3798 [1900] => 3802 [1902] => 3806 [1904] => 3810 [1906] => 3814 [1908] => 3818 [1910] => 3822 [1912] => 3826 [1914] => 3830 [1916] => 3834 [1918] => 3838 [1920] => 3842 [1922] => 3846 [1924] => 3850 [1926] => 3854 [1928] => 3858 [1930] => 3862 [1932] => 3866 [1934] => 3870 [1936] => 3874 [1938] => 3878 [1940] => 3882 [1942] => 3886 [1944] => 3890 [1946] => 3894 [1948] => 3898 [1950] => 3902 [1952] => 3906 [1954] => 3910 [1956] => 3914 [1958] => 3918 [1960] => 3922 [1962] => 3926 [1964] => 3930 [1966] => 3934 [1968] => 3938 [1970] => 3942 [1972] => 3946 [1974] => 3950 [1976] => 3954 [1978] => 3958 [1980] => 3962 [1982] => 3966 [1984] => 3970 [1986] => 3974 [1988] => 3978 [1990] => 3982 [1992] => 3986 [1994] => 3990 [1996] => 3994 [1998] => 3998 [2000] => 4002 [2002] => 4006 [2004] => 4010 [2006] => 4014 [2008] => 4018 [2010] => 4022 [2012] => 4026 [2014] => 4030 [2016] => 4034 [2018] => 4038 [2020] => 4042 [2022] => 4046 )
Output for 4.3.2 - 4.4.9
Warning: Wrong parameter count for range() in /in/LfvDG on line 3 Warning: Wrong parameter count for range() in /in/LfvDG on line 4 Warning: array_diff(): Argument #1 is not an array in /in/LfvDG on line 5
Output for 4.3.0 - 4.3.1
Warning: Wrong parameter count for range() in /in/LfvDG on line 3 Warning: Wrong parameter count for range() in /in/LfvDG on line 4 Warning: array_diff() [http://www.php.net/function.array-diff]: Argument #1 is not an array in /in/LfvDG on line 5