3v4l.org

run code in 300+ PHP versions simultaneously
<?php function double_chunk($array, $maxrows) { $size = sizeof($array); $columns = ceil($size / $maxrows); $fullrows = $size - ($columns - 1) * $maxrows; if ($fullrows == $maxrows) { return array_chunk($array, $fullrows); // all columns have full rows, don't splice } return array_merge( array_chunk( array_splice($array, 0, $columns * $fullrows), $columns ), array_chunk($array, $columns - 1) ); } var_export(double_chunk(range('a', 'g'), 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.0120.00318.30
8.3.50.0040.01118.29
8.3.40.0150.00018.79
8.3.30.0070.00718.54
8.3.20.0050.00319.15
8.3.10.0020.00523.69
8.3.00.0080.00020.71
8.2.180.0140.00016.38
8.2.170.0150.00022.96
8.2.160.0070.00722.08
8.2.150.0050.00324.18
8.2.140.0030.00624.66
8.2.130.0050.00319.95
8.2.120.0080.00026.35
8.2.110.0030.00622.28
8.2.100.0090.00318.03
8.2.90.0050.00317.75
8.2.80.0000.00817.97
8.2.70.0030.00717.93
8.2.60.0000.00817.97
8.2.50.0030.00618.10
8.2.40.0080.00019.48
8.2.30.0080.00019.32
8.2.20.0030.00619.82
8.2.10.0000.00718.21
8.2.00.0000.00817.63
8.1.280.0090.00925.92
8.1.270.0030.00522.23
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0090.00022.86
8.1.230.0110.00017.95
8.1.220.0030.00617.74
8.1.210.0000.00818.77
8.1.200.0080.00017.36
8.1.190.0000.00817.35
8.1.180.0000.00818.10
8.1.170.0040.00418.66
8.1.160.0040.00418.96
8.1.150.0050.00218.91
8.1.140.0000.00722.22
8.1.130.0040.00417.58
8.1.120.0050.00317.49
8.1.110.0000.00717.36
8.1.100.0040.00417.43
8.1.90.0040.00417.48
8.1.80.0040.00417.52
8.1.70.0040.00417.43
8.1.60.0030.00617.68
8.1.50.0040.00417.63
8.1.40.0080.00017.54
8.1.30.0000.00817.71
8.1.20.0080.00517.76
8.1.10.0030.00617.48
8.1.00.0020.00517.55
8.0.300.0000.00818.84
8.0.290.0000.00716.75
8.0.280.0070.00018.56
8.0.270.0030.00317.31
8.0.260.0030.00316.88
8.0.250.0000.00716.97
8.0.240.0000.00617.03
8.0.230.0100.00016.94
8.0.220.0050.00216.87
8.0.210.0070.00017.02
8.0.200.0060.00016.99
8.0.190.0040.00417.08
8.0.180.0050.00316.94
8.0.170.0060.00316.98
8.0.160.0030.00717.04
8.0.150.0070.00016.92
8.0.140.0040.00416.93
8.0.130.0000.00613.40
8.0.120.0030.00516.94
8.0.110.0040.00416.96
8.0.100.0040.00416.89
8.0.90.0030.00516.75
8.0.80.0080.00816.92
8.0.70.0040.00416.82
8.0.60.0000.00817.04
8.0.50.0070.00016.75
8.0.30.0150.00316.99
8.0.20.0090.00917.40
8.0.10.0000.00716.95
8.0.00.0110.00916.77
7.4.330.0000.00515.55
7.4.320.0040.00416.58
7.4.300.0030.00316.56
7.4.290.0030.00316.56
7.4.280.0040.00416.46
7.4.270.0000.00716.62
7.4.260.0110.00016.64
7.4.250.0000.00716.52
7.4.240.0040.00416.55
7.4.230.0030.00316.69
7.4.220.0080.00016.69
7.4.210.0060.00816.61
7.4.200.0030.00516.75
7.4.160.0070.01116.57
7.4.140.0080.00917.86
7.4.130.0000.01716.61
7.4.120.0110.00816.58
7.4.110.0120.00616.63
7.4.100.0090.01216.54
7.4.90.0100.00716.55
7.4.80.0070.01019.39
7.4.70.0130.00916.50
7.4.60.0070.01016.50
7.4.50.0030.01316.45
7.4.40.0080.01616.60
7.4.00.0100.00814.98
7.3.330.0030.00313.26
7.3.320.0030.00313.46
7.3.310.0060.00316.47
7.3.300.0030.00316.45
7.3.290.0000.00716.30
7.3.280.0070.00716.34
7.3.260.0080.01116.58
7.3.240.0090.01016.58
7.3.230.0090.00816.67
7.3.210.0110.01116.45
7.3.200.0080.00816.40
7.3.190.0030.01716.44
7.3.180.0160.00016.56
7.3.170.0070.01016.42
7.3.160.0060.00916.45
7.3.120.0070.01114.79
7.3.110.0100.00714.61
7.3.100.0110.00315.01
7.3.90.0090.00914.57
7.3.80.0030.01214.88
7.3.70.0100.00314.76
7.3.60.0110.00414.62
7.3.50.0130.00314.84
7.3.40.0060.00814.83
7.3.30.0070.00714.57
7.3.20.0040.01116.55
7.3.10.0090.00916.93
7.3.00.0040.00916.88
7.2.330.0100.00716.55
7.2.320.0060.01116.82
7.2.310.0060.01216.68
7.2.300.0160.00016.65
7.2.290.0080.00916.79
7.2.250.0070.01314.70
7.2.240.0060.01315.30
7.2.230.0080.00414.84
7.2.220.0000.01314.96
7.2.210.0060.01014.71
7.2.200.0130.00314.84
7.2.190.0060.00615.07
7.2.180.0120.00615.04
7.2.170.0160.00015.02
7.2.110.1710.01014.46
7.2.100.0980.00314.39
7.2.90.0930.01314.43
7.2.80.1000.01014.35
7.2.70.0790.01315.03
7.2.60.1130.00914.44
7.2.50.0960.00314.55
7.2.40.0930.00014.26
7.2.30.0890.00914.75
7.2.20.0890.00714.89
7.2.10.0920.01614.77
7.2.00.0770.01014.66
7.1.330.0050.00815.82
7.1.320.0100.00315.88
7.1.310.0060.00315.66
7.1.300.0100.00715.59
7.1.290.0040.01115.85
7.1.280.0070.00715.67
7.1.270.0090.00615.58
7.1.260.0060.00615.68
7.1.230.1100.00613.43
7.1.220.1400.00713.77
7.1.210.1000.00013.66
7.1.200.0750.00713.47
7.1.190.0330.00713.60
7.1.180.0860.00613.77
7.1.170.0920.01013.52
7.1.160.0830.00913.51
7.1.150.1080.00013.74
7.1.140.0750.01013.55
7.1.130.0800.00913.61
7.1.120.0870.01013.36
7.1.110.0870.01013.55
7.1.100.1020.00613.82
7.1.90.0940.00313.57
7.1.80.1120.01013.62
7.1.70.0890.01014.04
7.1.60.1050.01031.61
7.1.50.1410.01031.56
7.1.40.1370.01331.06
7.1.30.2030.01331.64
7.1.20.1370.01031.78
7.1.10.1300.00313.27
7.1.00.1120.01013.76
5.6.380.0080.00813.96

preferences:
57.23 ms | 401 KiB | 5 Q