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', 'r'), 7));

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.0090.00918.43
8.3.50.0110.00418.28
8.3.40.0150.00018.84
8.3.30.0070.00718.67
8.3.20.0030.00519.01
8.3.10.0080.00023.47
8.3.00.0040.00420.74
8.2.180.0060.00916.63
8.2.170.0140.00022.96
8.2.160.0030.01022.14
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0040.00419.89
8.2.120.0040.00426.35
8.2.110.0040.00422.33
8.2.100.0070.00417.91
8.2.90.0040.00418.03
8.2.80.0060.00317.97
8.2.70.0030.00617.77
8.2.60.0040.00418.22
8.2.50.0110.00018.10
8.2.40.0060.00319.33
8.2.30.0040.00419.37
8.2.20.0060.00318.17
8.2.10.0080.00018.21
8.2.00.0040.00417.64
8.1.280.0110.00825.92
8.1.270.0000.00822.14
8.1.260.0030.00526.35
8.1.250.0070.00028.09
8.1.240.0080.00317.36
8.1.230.0100.00022.72
8.1.220.0040.00417.77
8.1.210.0030.00618.77
8.1.200.0000.00817.35
8.1.190.0060.00317.24
8.1.180.0000.00818.10
8.1.170.0000.00918.64
8.1.160.0000.00718.91
8.1.150.0020.00518.95
8.1.140.0080.00022.11
8.1.130.0030.00320.08
8.1.120.0000.00717.57
8.1.110.0040.00417.52
8.1.100.0000.00817.50
8.1.90.0040.00417.44
8.1.80.0030.00517.56
8.1.70.0070.00017.45
8.1.60.0080.00017.54
8.1.50.0080.00017.59
8.1.40.0000.00817.60
8.1.30.0060.00317.73
8.1.20.0040.00817.68
8.1.10.0080.00017.62
8.1.00.0000.00817.41
8.0.300.0040.00419.73
8.0.290.0000.00916.75
8.0.280.0040.00418.39
8.0.270.0000.00817.31
8.0.260.0040.00418.50
8.0.250.0070.00017.00
8.0.240.0030.00317.03
8.0.230.0000.00717.00
8.0.220.0040.00416.98
8.0.210.0040.00416.96
8.0.200.0000.00617.01
8.0.190.0000.00817.06
8.0.180.0040.00416.81
8.0.170.0060.00317.00
8.0.160.0060.00317.03
8.0.150.0040.00416.79
8.0.140.0040.00316.81
8.0.130.0050.00013.41
8.0.120.0040.00416.91
8.0.110.0040.00417.02
8.0.100.0000.00716.86
8.0.90.0030.00516.75
8.0.80.0090.00916.93
8.0.70.0040.00416.86
8.0.60.0050.00216.90
8.0.50.0050.00316.84
8.0.30.0110.00817.26
8.0.20.0040.01617.40
8.0.10.0000.00717.14
8.0.00.0070.01216.69
7.4.330.0000.00415.55
7.4.320.0030.00316.47
7.4.300.0000.00716.54
7.4.290.0030.00316.66
7.4.280.0050.00316.55
7.4.270.0030.00316.48
7.4.260.0000.00716.51
7.4.250.0030.00316.63
7.4.240.0000.00716.58
7.4.230.0000.00716.68
7.4.220.0040.00416.47
7.4.210.0060.01016.57
7.4.200.0070.00016.41
7.4.160.0070.00916.52
7.4.140.0090.01017.86
7.4.130.0160.00616.65
7.4.120.0090.00816.62
7.4.110.0090.01516.61
7.4.100.0090.01316.60
7.4.90.0080.01216.58
7.4.80.0090.00819.39
7.4.70.0140.00716.71
7.4.60.0120.00416.52
7.4.50.0050.00716.42
7.4.40.0160.00316.52
7.4.10.0040.01514.77
7.4.00.0020.01515.06
7.3.330.0060.00013.44
7.3.320.0030.00313.17
7.3.310.0050.00316.44
7.3.300.0050.00316.46
7.3.290.0000.00716.30
7.3.280.0100.00316.42
7.3.260.0100.00916.41
7.3.240.0090.00916.59
7.3.230.0070.01016.64
7.3.210.0100.01016.67
7.3.200.0080.00816.65
7.3.190.0100.01316.44
7.3.180.0080.00816.30
7.3.170.0070.01116.39
7.3.160.0140.00716.53
7.3.130.0090.00414.83
7.3.120.0130.00714.93
7.3.110.0120.00614.86
7.3.100.0050.00914.95
7.3.90.0030.01014.70
7.3.80.0030.00714.89
7.3.70.0040.00914.94
7.3.60.0020.01114.87
7.3.50.0080.00714.82
7.3.40.0060.00714.77
7.3.30.0080.00514.76
7.3.20.0050.00616.71
7.3.10.0050.00716.45
7.3.00.0060.00316.69
7.2.330.0080.00816.39
7.2.320.0080.00916.66
7.2.310.0060.01016.77
7.2.300.0080.00816.55
7.2.290.0110.00716.62
7.2.260.0120.00814.84
7.2.250.0120.00414.63
7.2.240.0080.00714.99
7.2.230.0070.00814.94
7.2.220.0020.01015.14
7.2.210.0030.01115.00
7.2.200.0070.00815.02
7.2.190.0030.01214.97
7.2.180.0050.01015.10
7.2.170.0060.00615.11
7.2.160.0050.00814.81
7.2.150.0060.00516.97
7.2.140.0080.00816.84
7.2.130.0040.00717.01
7.2.120.0050.00816.75
7.2.110.0320.00916.08
7.2.100.0320.01016.08
7.2.90.0160.00716.20
7.2.80.0550.00816.17
7.2.70.0660.01116.16
7.2.60.0300.00916.23
7.2.50.0310.01016.02
7.2.40.0190.01216.18
7.2.30.0170.01116.18
7.2.20.0330.00916.26
7.2.10.0320.00616.19
7.2.00.0380.01116.04
7.1.330.0070.00815.72
7.1.320.0050.00815.72
7.1.310.0060.00616.01
7.1.300.0050.01115.77
7.1.290.0030.00815.47
7.1.280.0020.00915.84
7.1.270.0060.00315.56
7.1.260.0050.00815.74
7.1.250.0050.00615.84
7.1.240.0040.01215.84
7.1.230.0510.00514.83
7.1.220.0650.00914.85
7.1.210.0550.00514.56
7.1.200.0560.00914.83
7.1.190.0540.00514.85
7.1.180.0460.00614.67
7.1.170.0240.00914.59
7.1.160.0480.00514.77
7.1.150.0280.00714.89
7.1.140.0480.00814.77
7.1.130.0600.00814.70
7.1.120.0620.01014.77
7.1.110.0520.00814.70
7.1.100.0320.01214.71
7.1.90.0410.01014.76
7.1.80.0610.00514.96
7.1.70.0450.00514.94
7.1.60.0460.00823.76
7.1.50.0920.01323.73
7.1.40.0650.00523.42
7.1.30.0630.01223.87
7.1.20.0690.00523.64
7.1.10.0710.01214.73
7.1.00.0410.00514.87
7.0.330.0030.00615.53
7.0.320.0120.00315.37
7.0.310.0060.00615.46
7.0.300.0000.01415.42
7.0.290.0040.01115.48
7.0.280.0030.01015.34
7.0.270.0110.00415.41
7.0.260.0030.01015.28
7.0.250.0060.00615.51
7.0.240.0060.00915.31
7.0.230.0090.00615.38
7.0.220.0070.00715.46
7.0.210.0070.00415.39
7.0.200.0030.01015.44
7.0.190.0070.00715.49
7.0.180.0090.00615.13
7.0.170.0000.01615.54
7.0.160.0030.01315.43
7.0.150.0070.00715.48
7.0.140.0060.00615.51
7.0.130.0110.00015.23
7.0.120.0040.00715.15
7.0.110.0030.01215.56
7.0.100.0030.00915.36
7.0.90.0120.00315.58
7.0.80.0030.00815.28
7.0.70.0060.00615.31
7.0.60.0030.00915.56
7.0.50.0050.00315.46
7.0.40.0030.01213.48
7.0.30.0120.00313.31
7.0.20.0070.00713.49
7.0.10.0060.00613.58
7.0.00.0060.00613.52
5.6.400.0040.00414.57
5.6.390.0040.01114.18
5.6.380.0060.01014.26
5.6.370.0040.01114.50
5.6.360.0040.01114.20
5.6.350.0040.00414.09
5.6.340.0030.01213.79
5.6.330.0120.00314.50
5.6.320.0040.00714.38
5.6.310.0110.00014.29
5.6.300.0080.00814.38
5.6.290.0110.00314.58
5.6.280.0000.01214.25
5.6.270.0070.00714.25
5.6.260.0000.01714.39
5.6.250.0060.00914.45
5.6.240.0040.00814.41
5.6.230.0040.01114.42
5.6.220.0030.00714.17
5.6.210.0100.00714.44
5.6.200.0060.00614.10
5.6.190.0110.00414.50
5.6.180.0060.00914.16
5.6.170.0060.01214.40
5.6.160.0100.00314.07
5.6.150.0000.01014.50
5.6.140.0080.00814.35
5.6.130.0080.00413.96
5.6.120.0030.01214.39
5.6.110.0090.00614.27
5.6.100.0110.00414.69
5.6.90.0070.00714.31
5.6.80.0020.01414.24
5.6.70.0040.00814.45
5.6.60.0030.01014.33
5.6.50.0080.00814.23
5.6.40.0090.00314.00
5.6.30.0050.00514.06
5.6.20.0070.00713.91
5.6.10.0060.00914.29
5.6.00.0100.00314.51

preferences:
61.07 ms | 400 KiB | 5 Q