3v4l.org

run code in 300+ PHP versions simultaneously
<?php function array_split($input, $size=1) { $result = array(); for ($i = 0; $i < $size; $i++) { $remaining_slots = $size - $i; $remaining_items = count($input); $chunk_size = ceil($remaining_items / $remaining_slots); $chunk = array(); for ($e = 0; $e < $chunk_size; $e++) { $chunk[] = array_shift($input); } $result[] = $chunk; } return $result; } var_dump(array_split(range(0, 10000), 4));

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0100.12018.43
8.3.50.0170.12121.34
8.3.40.0230.12119.01
8.3.30.0160.11520.59
8.3.20.0070.06320.72
8.3.10.0100.06321.89
8.3.00.0100.06022.50
8.2.180.0240.11416.75
8.2.170.0130.13322.96
8.2.160.0130.11422.11
8.2.150.0100.06024.18
8.2.140.0100.06124.66
8.2.130.0170.07326.16
8.2.120.0030.06620.93
8.2.110.0130.23322.12
8.2.100.0130.10718.09
8.2.90.0070.08819.42
8.2.80.0030.09019.70
8.2.70.0070.08817.88
8.2.60.0100.08518.30
8.2.50.0030.09018.07
8.2.40.0130.11318.58
8.2.30.0070.08819.87
8.2.20.0100.09118.25
8.2.10.0070.08918.25
8.2.00.0100.09318.11
8.1.280.0170.15625.92
8.1.270.0130.07923.99
8.1.260.0130.07726.35
8.1.250.0000.08928.09
8.1.240.0130.24223.84
8.1.230.0230.12719.70
8.1.220.0070.11118.41
8.1.210.0070.12518.77
8.1.200.0070.11017.85
8.1.190.0070.11418.15
8.1.180.0130.11018.10
8.1.170.0130.11519.09
8.1.160.0070.11219.52
8.1.150.0070.11819.27
8.1.140.0100.15618.26
8.1.130.0100.10718.63
8.1.120.0030.12618.25
8.1.110.0070.11018.24
8.1.100.0000.11618.25
8.1.90.0000.11718.12
8.1.80.0100.10718.12
8.1.70.0070.11618.13
8.1.60.0100.21518.23
8.1.50.0130.21118.26
8.1.40.0070.22018.30
8.1.30.0070.21818.34
8.1.20.0000.22418.27
8.1.10.0030.21918.26
8.1.00.0070.21718.21
8.0.300.0070.11218.77
8.0.290.0030.11117.66
8.0.280.0030.11119.15
8.0.270.0100.10717.85
8.0.260.0070.10817.36
8.0.250.0030.12817.51
8.0.240.0100.10717.62
8.0.230.0070.16517.59
8.0.220.0070.11017.38
8.0.210.0000.11617.54
8.0.200.0000.11917.46
8.0.190.0130.20817.57
8.0.180.0070.21417.32
8.0.170.0070.21617.47
8.0.160.0070.21717.52
8.0.150.0030.22217.49
8.0.140.0070.21817.39
8.0.130.0070.21614.01
8.0.120.0070.21917.39
8.0.110.0030.21417.37
8.0.100.0030.22017.45
8.0.90.0070.22017.33
8.0.80.0130.21217.43
8.0.70.0030.22117.32
8.0.60.0030.21617.34
8.0.50.0070.21717.48
8.0.30.0430.26317.55
8.0.20.0490.20617.69
8.0.10.0030.21717.57
8.0.00.0330.20317.29
7.4.330.0030.11715.00
7.4.320.0100.11417.00
7.4.300.0070.11017.01
7.4.290.0030.21517.09
7.4.280.0100.22317.04
7.4.270.0070.21417.19
7.4.260.0030.22113.99
7.4.250.0130.21217.14
7.4.240.0050.21717.21
7.4.230.0070.21217.19
7.4.220.0170.28117.18
7.4.210.0160.23917.15
7.4.200.0200.20817.17
7.4.190.0070.21317.34
7.4.160.0390.21417.21
7.4.150.0650.21317.40
7.4.140.0480.21017.86
7.4.130.0400.19117.13
7.4.120.0500.22617.09
7.4.110.0500.21917.27
7.4.100.0290.23117.13
7.4.90.0330.19616.96
7.4.80.0190.22119.39
7.4.70.0290.25317.09
7.4.60.0260.19317.26
7.4.50.0070.17217.27
7.4.40.0160.22422.77
7.4.30.0190.21717.19
7.3.330.0070.22214.13
7.3.320.0100.21813.82
7.3.310.0070.21917.03
7.3.300.0030.21916.94
7.3.290.0200.20916.95
7.3.280.0190.25516.97
7.3.270.0320.20017.40
7.3.260.0440.21616.97
7.3.250.0280.22516.92
7.3.240.0450.19516.84
7.3.230.0540.19616.86
7.3.210.0400.23417.24
7.3.200.0230.24619.39
7.3.190.0470.26616.85
7.3.180.0070.20816.81
7.3.170.0640.26117.16
7.3.160.0310.21617.18
7.2.330.0390.22017.33
7.2.320.0650.35317.30
7.2.310.1030.32017.27
7.2.300.0370.21517.32
7.2.290.0160.21217.22
7.2.90.1960.20615.34
7.2.80.2390.16015.26
7.2.70.0850.16515.57
7.2.60.2190.16715.35
7.2.50.0260.17915.44
7.2.40.0640.30915.43
7.2.30.0290.17415.41
7.2.20.0320.17015.30
7.2.10.1790.15715.44
7.2.00.0510.17115.23
7.1.210.0840.22214.42
7.1.200.0460.18314.47
7.1.190.0500.18914.47
7.1.180.2030.18414.08
7.1.170.0340.15214.26
7.1.160.0550.26414.23
7.1.150.1930.17314.64
7.1.140.0180.24614.52
7.1.130.0380.18414.39
7.1.120.0160.16714.36
7.1.110.0720.23714.31
7.1.100.1050.24214.50
7.1.90.2000.14714.50
7.1.80.2060.15914.57
7.1.70.1810.17114.57
7.1.60.0440.14932.23
7.1.50.0340.17132.50
7.1.40.1780.17332.61
7.1.30.0420.16532.57
7.1.20.1340.15932.77
7.1.10.0310.20914.41
7.1.00.0220.23014.32
7.0.310.0170.17613.90
7.0.300.1890.21014.14
7.0.290.0210.30114.00
7.0.280.0420.16214.18
7.0.270.0350.16113.92
7.0.260.1650.16714.21
7.0.250.1010.18014.12
7.0.240.0390.15814.07
7.0.230.1670.17313.94
7.0.220.1960.21714.19
7.0.210.0750.24113.88
7.0.200.0240.16013.71
7.0.190.0290.18613.96
7.0.180.0440.23014.35
7.0.170.1820.18314.21
7.0.160.0820.18314.38
7.0.150.0340.16113.89
7.0.140.2150.18214.19
7.0.130.1830.17414.39
7.0.120.1750.18514.24
7.0.110.0220.20114.29
7.0.100.1820.24114.01
7.0.90.1750.20914.25
7.0.80.1640.16514.30
7.0.70.0260.21814.24
7.0.60.1330.19914.41
7.0.50.1960.25714.37
7.0.40.0660.22714.14
7.0.30.1930.18014.20
7.0.20.1190.16414.02
7.0.10.0250.15214.08
7.0.00.0330.19914.22
5.6.300.0310.44116.66
5.6.290.0180.46516.83
5.6.280.0210.44416.99
5.6.270.0390.44417.07
5.6.260.0310.46816.95
5.6.250.0390.45017.35
5.6.240.0340.44316.82
5.6.230.0250.44917.10
5.6.220.0280.45017.04
5.6.210.0230.46216.95
5.6.200.0250.45016.92
5.6.190.0460.43616.94
5.6.180.0420.45716.70
5.6.170.0390.45116.88
5.6.160.0350.43116.87
5.6.150.0410.42716.71
5.6.140.0180.45516.91
5.6.130.0260.45917.13
5.6.120.0220.45217.01
5.6.110.0220.47517.05
5.6.100.0260.48117.18
5.6.90.0600.47316.68
5.6.80.0190.45816.95
5.6.70.0250.44216.54
5.6.60.0220.44616.73
5.6.50.0310.43516.94
5.6.40.0320.43616.81
5.6.30.0310.48016.79
5.6.20.0290.45516.90
5.6.10.0240.45116.67
5.6.00.0330.43716.82
5.5.380.0360.71213.86
5.5.370.0440.71813.80
5.5.360.0320.71313.76
5.5.350.0340.70213.81
5.5.340.0120.73713.93
5.5.330.0530.68314.03
5.5.320.0260.72713.79
5.5.310.0470.72514.12
5.5.300.0350.73014.12
5.5.290.0380.73013.90
5.5.280.0400.73414.41
5.5.270.0340.73813.87
5.5.260.0560.71613.87
5.5.250.0630.73713.85
5.5.240.0180.71913.57
5.5.230.0190.70814.09
5.5.220.0190.70713.72
5.5.210.0170.71613.97
5.5.200.0260.72613.86
5.5.190.0240.70413.91
5.5.180.0240.74613.76
5.5.170.0310.74317.03
5.5.160.0320.74514.06
5.5.150.0310.73413.86
5.5.140.0350.73514.00
5.5.130.0300.73314.00
5.5.120.0280.72314.01
5.5.110.0240.69513.68
5.5.100.0260.73414.00
5.5.90.0390.69813.48
5.4.450.0280.71014.14
5.4.440.0300.75114.16
5.4.430.0660.68414.08
5.4.420.0160.74914.06
5.4.410.0280.70714.23
5.4.400.0330.69214.20
5.4.390.0230.72014.23
5.4.380.0190.71713.90
5.4.370.0380.71013.75
5.4.360.0280.73513.82
5.4.350.0360.73413.84
5.4.340.0300.72014.24
5.4.330.0260.74813.71
5.4.320.0190.74413.96
5.4.310.0250.71513.52
5.4.300.0370.72913.99
5.4.290.0250.75714.19
5.4.280.0290.73813.84
5.4.270.0330.71813.80
5.4.260.0260.71813.78
5.4.250.0260.71513.42
5.3.290.0170.73113.43

preferences:
39.07 ms | 401 KiB | 5 Q