3v4l.org

run code in 300+ PHP versions simultaneously
<?php $max = 100; // The last number $cols = 5; // The point at which a new line will start $arr = array_chunk(range(1, $max), $cols); // Magic ;D // Print the data. foreach ($arr as $key => $row) { // This will reverse every other row $row = ($key % 2 === 0) ? $row : array_reverse($row); foreach ($row as $value) { $value = str_pad($value, strlen($max), ' ', STR_PAD_LEFT); echo "{$value} "; } echo "\n"; }

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.0030.01716.50
8.3.50.0120.00916.44
8.3.40.0040.01118.72
8.3.30.0100.00618.76
8.3.20.0070.00721.73
8.3.10.0060.00318.86
8.3.00.0030.00519.25
8.2.180.0060.00916.50
8.2.170.0110.00718.60
8.2.160.0130.00022.96
8.2.150.0040.00425.66
8.2.140.0000.00924.66
8.2.130.0050.00326.16
8.2.120.0080.00019.77
8.2.110.0000.01022.25
8.2.100.0090.00317.72
8.2.90.0000.00817.84
8.2.80.0080.00017.97
8.2.70.0060.00317.50
8.2.60.0060.00318.04
8.2.50.0000.00818.07
8.2.40.0060.00318.22
8.2.30.0000.00818.14
8.2.20.0080.00017.96
8.2.10.0040.00419.52
8.2.00.0000.00718.15
8.1.280.0120.00325.92
8.1.270.0060.00320.36
8.1.260.0030.00626.35
8.1.250.0040.00428.09
8.1.240.0100.00022.59
8.1.230.0120.00020.85
8.1.220.0030.00617.80
8.1.210.0080.00020.63
8.1.200.0000.00917.35
8.1.190.0050.00317.22
8.1.180.0050.00518.10
8.1.170.0040.00418.48
8.1.160.0070.00018.91
8.1.150.0040.00418.84
8.1.140.0040.00420.19
8.1.130.0000.00820.28
8.1.120.0000.00917.46
8.1.110.0040.00417.50
8.1.100.0050.00217.53
8.1.90.0030.00717.48
8.1.80.0000.00917.41
8.1.70.0060.00317.35
8.1.60.0040.00417.63
8.1.50.0030.00617.51
8.1.40.0040.00417.44
8.1.30.0000.00817.68
8.1.20.0000.00917.61
8.1.10.0080.00017.57
8.1.00.0030.00517.48
8.0.300.0040.00420.07
8.0.290.0050.00316.75
8.0.280.0030.00318.39
8.0.270.0050.00317.14
8.0.260.0000.00618.38
8.0.250.0030.00617.01
8.0.240.0000.00716.86
8.0.230.0050.00216.96
8.0.220.0060.00316.90
8.0.210.0030.00316.89
8.0.200.0000.00616.99
8.0.190.0050.00516.93
8.0.180.0060.00316.83
8.0.170.0000.00916.81
8.0.160.0040.00416.96
8.0.150.0000.00916.73
8.0.140.0040.00416.85
8.0.130.0050.00013.30
8.0.120.0050.00316.84
8.0.110.0050.00316.91
8.0.100.0040.00416.73
8.0.90.0040.00416.70
8.0.80.0060.00916.96
8.0.70.0030.00516.81
8.0.60.0030.00516.93
8.0.50.0000.00716.88
8.0.30.0090.01117.00
8.0.20.0130.00717.06
8.0.10.0050.00217.09
8.0.00.0090.01216.79
7.4.330.0020.00215.55
7.4.320.0000.00616.64
7.4.300.0030.00316.42
7.4.290.0000.00716.61
7.4.280.0070.00016.54
7.4.270.0000.00716.43
7.4.260.0000.00716.61
7.4.250.0050.00216.61
7.4.240.0050.00216.61
7.4.230.0000.00716.73
7.4.220.0000.00816.71
7.4.210.0090.00616.62
7.4.200.0000.00816.61
7.4.160.0080.00816.52
7.4.140.0100.00917.86
7.4.130.0120.00616.42
7.4.120.0050.01216.55
7.4.110.0060.01316.50
7.4.100.0100.00716.57
7.4.90.0120.01216.69
7.4.80.0170.00019.39
7.4.70.0130.00516.72
7.4.60.0180.00016.57
7.4.50.0030.01016.64
7.4.40.0140.00416.53
7.4.00.0000.01714.88
7.3.330.0050.00013.07
7.3.320.0030.00313.28
7.3.310.0020.00516.35
7.3.300.0000.00716.34
7.3.290.0000.00716.36
7.3.280.0050.01116.38
7.3.260.0110.01016.47
7.3.240.0130.00616.44
7.3.230.0090.00916.46
7.3.210.0040.01516.51
7.3.200.0100.00716.38
7.3.190.0070.01316.63
7.3.180.0070.01016.57
7.3.170.0150.00616.51
7.3.160.0060.01116.63
7.3.20.0340.00714.65
7.3.10.0480.01315.07
7.3.00.0310.01014.80
7.2.330.0070.01316.68
7.2.320.0040.01216.55
7.2.310.0160.00316.68
7.2.300.0150.00416.72
7.2.290.0100.01316.52
7.2.150.0380.00015.12
7.2.140.0370.01414.86
7.2.130.0440.00014.65
7.2.120.0410.01115.04
7.2.110.0470.00715.12
7.2.100.0520.00014.72
7.2.90.0560.00615.04
7.2.80.0470.00715.05
7.2.70.0350.00414.91
7.2.60.0430.00015.18
7.2.50.0450.00614.99
7.2.40.0370.00614.91
7.2.30.0300.00915.20
7.2.20.0360.01015.17
7.2.10.0640.00714.61
7.2.00.0510.00014.79
7.1.250.0270.01213.68

preferences:
55.8 ms | 400 KiB | 5 Q