3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0]; $max = 0; for ($i = 0, $l = ceil(count($arr)) / 2; $i < $l; $i++) { if ($arr[$i] > $max) { $max = $arr[$i]; } } for ($l = count($arr); $i < $l; $i++) { if ($arr[$i] > $max) { $max = $arr[$i]; } } echo "$max in $i iterations";

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.40.0040.01118.85
8.3.30.0110.00420.19
8.3.20.0130.00318.90
8.3.10.0000.00821.05
8.3.00.0080.00019.64
8.2.170.0110.00422.96
8.2.160.0100.00320.35
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0040.00419.95
8.2.110.0100.00020.58
8.2.100.0000.01217.97
8.2.90.0030.00619.17
8.2.80.0050.00319.25
8.2.70.0080.00317.63
8.2.60.0040.00418.04
8.2.50.0030.00618.07
8.2.40.0050.00318.34
8.2.30.0000.00719.48
8.2.20.0070.00017.73
8.2.10.0050.00317.79
8.2.00.0040.00417.79
8.1.270.0040.00423.99
8.1.260.0000.00726.35
8.1.250.0020.00528.09
8.1.240.0090.00022.47
8.1.230.0060.00620.88
8.1.220.0040.00418.77
8.1.210.0040.00418.90
8.1.200.0100.00017.35
8.1.190.0040.00417.40
8.1.180.0040.00418.10
8.1.170.0040.00418.55
8.1.160.0030.00618.89
8.1.150.0040.00418.64
8.1.140.0000.00717.45
8.1.130.0000.00717.82
8.1.120.0030.00417.43
8.1.110.0040.00417.34
8.1.100.0040.00417.36
8.1.90.0070.00017.44
8.1.80.0000.00817.43
8.1.70.0000.00717.39
8.1.60.0040.00417.47
8.1.50.0040.00417.35
8.1.40.0000.00917.44
8.1.30.0000.00717.61
8.1.20.0090.00017.53
8.1.10.0000.00717.60
8.1.00.0030.00617.44
8.0.300.0070.00019.87
8.0.290.0070.00017.18
8.0.280.0050.00318.45
8.0.270.0030.00317.16
8.0.260.0000.00716.77
8.0.250.0000.00716.87
8.0.240.0080.00016.95
8.0.230.0070.00016.84
8.0.220.0000.01016.82
8.0.210.0070.00016.91
8.0.200.0030.00316.97
8.0.190.0040.00416.79
8.0.180.0070.00016.91
8.0.170.0050.00216.80
8.0.160.0000.00716.95
8.0.150.0030.00516.83
8.0.140.0040.00416.88
8.0.130.0000.00613.35
8.0.120.0040.00416.80
8.0.110.0000.00817.02
8.0.100.0050.00316.84
8.0.90.0040.00416.88
8.0.80.0030.01216.89
8.0.70.0040.00416.75
8.0.60.0040.00416.93
8.0.50.0050.00316.79
8.0.30.0160.00817.34
8.0.20.0130.01017.40
8.0.10.0080.00017.02
8.0.00.0120.01116.62
7.4.330.0000.00516.74
7.4.320.0030.00316.64
7.4.300.0030.00316.62
7.4.290.0030.00316.50
7.4.280.0070.00016.57
7.4.270.0030.00316.45
7.4.260.0050.00013.30
7.4.250.0040.00416.48
7.4.240.0050.00216.54
7.4.230.0030.00316.51
7.4.220.0290.00816.64
7.4.210.0060.01016.61
7.4.200.0070.00016.57
7.4.190.0070.00016.46
7.4.160.0030.01316.48
7.4.150.0070.01017.40
7.4.140.0070.01017.86
7.4.130.0130.00516.43
7.4.120.0060.01116.42
7.4.110.0130.00716.55
7.4.100.0160.00816.68
7.4.90.0130.01316.46
7.4.80.0090.01219.39
7.4.70.0040.01916.51
7.4.60.0160.00016.64
7.4.50.0060.00316.06
7.4.40.0000.01122.77
7.4.30.0050.01116.31
7.4.00.0040.01314.98
7.3.330.0030.00313.22
7.3.320.0000.00613.08
7.3.310.0000.00716.39
7.3.300.0040.00416.16
7.3.290.0090.00916.37
7.3.280.0070.01016.30
7.3.270.0030.01317.40
7.3.260.0120.01018.24
7.3.250.0150.00616.49
7.3.240.0150.00316.63
7.3.230.0120.01316.55
7.3.210.0120.00416.48
7.3.200.0070.01019.39
7.3.190.0080.01516.64
7.3.180.0090.00616.46
7.3.170.0120.00316.53
7.3.160.0170.00316.61
7.3.120.0050.01214.65
7.3.110.0060.00915.02
7.3.100.0040.01214.84
7.3.90.0030.00714.50
7.3.80.0060.00615.01
7.3.70.0040.00415.00
7.3.60.0030.01014.87
7.3.50.0030.00615.02
7.3.40.0070.00714.84
7.3.30.0110.00314.81
7.3.20.0090.00316.71
7.3.10.0070.00516.80
7.3.00.0060.00516.72
7.2.330.0030.01316.56
7.2.320.0000.01716.49
7.2.310.0070.01316.70
7.2.300.0080.00816.61
7.2.290.0080.00816.76
7.2.250.0060.00915.15
7.2.240.0060.01015.26
7.2.230.0070.01114.72
7.2.220.0030.00615.33
7.2.210.0030.01014.63
7.2.200.0070.00314.97
7.2.190.0000.01314.88
7.2.180.0100.00314.76
7.2.170.0090.00615.00
7.2.130.0030.01017.15
7.2.120.0040.01116.96
7.2.110.0100.00616.61
7.2.100.0090.00616.71
7.2.90.0030.01016.82
7.2.80.0000.01417.02
7.2.70.0000.01516.68
7.2.60.0040.01217.14
7.2.50.0000.01216.79
7.2.40.0040.00817.09
7.2.30.0030.01416.75
7.2.20.0030.00816.86
7.2.10.0030.00616.87
7.2.00.0050.00718.11
7.1.330.0100.00315.74
7.1.320.0030.00915.78
7.1.310.0060.00315.85
7.1.300.0060.00615.67
7.1.290.0070.00715.84
7.1.280.0090.00615.69
7.1.270.0130.00315.63
7.1.260.0000.01015.83
7.1.250.0070.00315.93
7.1.100.0040.00418.13
7.1.70.0000.00816.87
7.1.60.0110.01419.24
7.1.50.0070.01817.04
7.1.00.0030.03322.33
7.0.200.0060.00916.68
7.0.140.0070.07022.13
7.0.100.0100.07719.96
7.0.90.0100.07719.91
7.0.80.0070.07319.88
7.0.70.0200.04019.98
7.0.60.0070.07719.89
7.0.50.0070.06020.21
7.0.40.0000.08720.12
7.0.30.0070.08020.11
7.0.20.0130.06020.14
7.0.10.0170.06320.04
7.0.00.0100.06320.09
5.6.280.0000.07721.07
5.6.250.0030.06020.59
5.6.240.0030.07320.59
5.6.230.0000.09320.50
5.6.220.0070.07320.51
5.6.210.0070.04020.77
5.6.200.0000.08320.96
5.6.190.0100.08321.10
5.6.180.0030.08321.04
5.6.170.0070.07321.13
5.6.160.0070.06021.11
5.6.150.0130.07721.15
5.6.140.0030.05321.03
5.6.130.0100.06720.94
5.6.120.0200.05320.95
5.6.110.0030.08321.07
5.6.100.0030.08321.15
5.6.90.0100.08321.05
5.6.80.0070.05320.42
5.6.70.0070.06020.43
5.6.60.0070.05020.44
5.6.50.0030.08720.33
5.6.40.0100.08020.32
5.6.30.0070.07720.46
5.6.20.0070.07720.45
5.6.10.0070.06020.48
5.6.00.0000.04320.38
5.5.380.0100.08320.41
5.5.370.0130.06720.45
5.5.360.0070.06320.43
5.5.350.0030.06720.38
5.5.340.0100.05320.82
5.5.330.0100.08320.75
5.5.320.0070.08320.78
5.5.310.0070.08720.81
5.5.300.0030.05720.88
5.5.290.0030.08020.91
5.5.280.0030.07720.64
5.5.270.0130.06720.91
5.5.260.0030.08720.82
5.5.250.0170.06320.64
5.5.240.0000.05020.02
5.5.230.0030.08320.15
5.5.220.0030.08320.16
5.5.210.0130.07320.24
5.5.200.0130.05020.22
5.5.190.0170.07020.17
5.5.180.0130.07020.07
5.5.160.0100.05020.12
5.5.150.0000.07720.12
5.5.140.0100.07320.10
5.5.130.0100.07020.17
5.5.120.0070.04320.27
5.5.110.0030.04720.24
5.5.100.0070.08019.95
5.5.90.0030.05720.13
5.5.80.0200.03320.04
5.5.70.0030.06720.05
5.5.60.0000.05320.02
5.5.50.0070.05020.08
5.5.40.0100.07319.96
5.5.30.0030.06720.04
5.5.20.0030.05020.04
5.5.10.0200.04019.95
5.5.00.0030.06020.11
5.4.450.0100.06019.30
5.4.440.0170.07319.38
5.4.430.0130.07019.27
5.4.420.0070.04719.48
5.4.410.0070.07319.00
5.4.400.0070.04019.05
5.4.390.0030.04318.78
5.4.380.0030.04318.81
5.4.370.0130.06019.06
5.4.360.0030.08019.14
5.4.350.0130.06318.79
5.4.340.0070.08318.94
5.4.320.0170.06319.14
5.4.310.0100.07318.90
5.4.300.0030.06019.11
5.4.290.0030.07318.81
5.4.280.0130.07718.89
5.4.270.0130.07019.02
5.4.260.0100.06719.06
5.4.250.0100.07719.02
5.4.240.0100.07319.17
5.4.230.0030.05018.95
5.4.220.0030.07019.09
5.4.210.0100.07719.05
5.4.200.0100.07018.99
5.4.190.0170.03718.95
5.4.180.0100.04018.80
5.4.170.0070.07719.11
5.4.160.0100.07018.95
5.4.150.0100.08018.94
5.4.140.0100.06316.12
5.4.130.0030.04716.28
5.4.120.0070.07316.11
5.4.110.0100.04016.23
5.4.100.0000.07316.30
5.4.90.0070.04016.45
5.4.80.0070.06016.34
5.4.70.0100.06016.34
5.4.60.0170.04716.23
5.4.50.0070.06316.30
5.4.40.0100.06316.45
5.4.30.0030.07716.37
5.4.20.0100.07016.23
5.4.10.0030.03716.14
5.4.00.0030.07315.81
5.3.290.0130.05714.53
5.3.280.0030.04714.59
5.3.270.0100.07014.46
5.3.260.0100.04314.56
5.3.250.0000.08714.46
5.3.240.0000.08014.60
5.3.230.0030.06714.56
5.3.220.0000.08314.57
5.3.210.0130.05714.52
5.3.200.0000.07714.43
5.3.190.0070.07314.57
5.3.180.0130.06314.42
5.3.170.0030.07714.55
5.3.160.0030.07014.42
5.3.150.0100.06314.56
5.3.140.0070.07314.42
5.3.130.0130.06314.48
5.3.120.0000.05314.38
5.3.110.0030.05714.38
5.3.100.0000.04314.02
5.3.90.0070.03313.88
5.3.80.0030.06713.88
5.3.70.0030.07014.00
5.3.60.0070.03314.01
5.3.50.0030.07313.90
5.3.40.0000.04013.71
5.3.30.0130.06013.89
5.3.20.0070.07013.45
5.3.10.0000.06013.64
5.3.00.0030.07013.50
5.2.170.0000.06311.12
5.2.160.0100.05711.09
5.2.150.0000.06711.19
5.2.140.0030.06010.93
5.2.130.0030.06710.95
5.2.120.0030.06711.09
5.2.110.0000.06011.05
5.2.100.0030.06711.08
5.2.90.0070.06010.93
5.2.80.0070.06711.01
5.2.70.0130.05311.13
5.2.60.0100.05311.09
5.2.50.0130.04310.96
5.2.40.0070.05010.98
5.2.30.0070.05010.79
5.2.20.0030.03711.04
5.2.10.0030.05710.89
5.2.00.0070.06010.75
5.1.60.0000.0309.83
5.1.50.0000.0539.98
5.1.40.0030.0539.97
5.1.30.0030.03310.39
5.1.20.0070.04710.27
5.1.10.0030.05710.14
5.1.00.0070.03310.11
5.0.50.0100.0308.54
5.0.40.0030.0478.43
5.0.30.0030.0478.11
5.0.20.0000.0378.27
5.0.10.0000.0508.30
5.0.00.0030.0638.27
4.4.90.0000.0408.11
4.4.80.0030.0238.11
4.4.70.0000.0308.11
4.4.60.0070.0178.11
4.4.50.0000.0408.11
4.4.40.0070.0508.11
4.4.30.0030.0378.11
4.4.20.0000.0378.11
4.4.10.0030.0338.11
4.4.00.0030.0308.11
4.3.110.0000.0178.11
4.3.100.0000.0338.11
4.3.90.0030.0338.11
4.3.80.0030.0508.11
4.3.70.0030.0308.11
4.3.60.0000.0178.11
4.3.50.0030.0138.11
4.3.40.0000.0338.11
4.3.30.0000.0378.11
4.3.20.0000.0378.11
4.3.10.0000.0208.11
4.3.00.0000.0308.11

preferences:
36.18 ms | 400 KiB | 5 Q