3v4l.org

run code in 300+ PHP versions simultaneously
<?php CONST MIN = 1; CONST MAX = 1000000000; $result = 0; for ($i = MIN; $i <= MAX; $i++) { $result += $i; } var_dump($result); $result = (MIN + MAX) * (MAX / 2); //It's *MAX/2 because the step is 1 (there are MAX elements to the series). var_dump($result);

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.0131.98918.18
8.3.50.0131.99022.01
8.3.40.0071.99718.57
8.3.30.0002.00419.09
8.3.20.0031.99820.29
8.3.10.0031.99721.96
8.3.00.0031.99922.58
8.2.180.0101.99116.50
8.2.170.0101.99322.96
8.2.160.0071.99820.80
8.2.150.0031.99824.18
8.2.140.0032.00124.66
8.2.130.0071.99626.16
8.2.120.0032.00017.50
8.2.110.0071.99420.56
8.2.100.0071.99817.97
8.2.90.0031.99919.29
8.2.80.0002.00617.97
8.2.70.0031.99817.50
8.2.60.0101.99618.05
8.2.50.0031.99718.07
8.2.40.0002.00217.91
8.2.30.0071.99618.20
8.2.20.0002.00317.78
8.2.10.0031.99419.48
8.2.00.0032.00017.75
8.1.280.0101.99325.92
8.1.270.0031.99822.11
8.1.260.0002.00426.35
8.1.250.0031.99828.09
8.1.240.0031.99922.05
8.1.230.0032.00417.51
8.1.220.0031.99817.74
8.1.210.0031.99718.77
8.1.200.0071.99717.48
8.1.190.0071.99717.52
8.1.180.0071.99518.10
8.1.170.0002.00218.59
8.1.160.0071.99322.07
8.1.150.0002.00318.76
8.1.140.0032.00217.47
8.1.130.0032.00017.84
8.1.120.0031.99517.51
8.1.110.0002.00317.39
8.1.100.0032.00017.50
8.1.90.0071.99617.45
8.1.80.0071.99417.48
8.1.70.0032.00117.50
8.1.60.0071.99717.53
8.1.50.0031.99817.54
8.1.40.0071.99417.57
8.1.30.0071.99917.63
8.1.20.0002.00317.62
8.1.10.0002.00317.40
8.1.00.0002.00217.41
8.0.300.0032.00118.77
8.0.290.0002.00116.62
8.0.280.0002.00318.38
8.0.270.0031.99817.14
8.0.260.0031.99916.71
8.0.250.0031.99916.90
8.0.240.0071.99616.91
8.0.230.0002.00516.88
8.0.220.0071.99716.73
8.0.210.0032.00016.75
8.0.200.0002.00216.75
8.0.190.0032.00016.86
8.0.180.0002.00216.91
8.0.170.0032.00016.84
8.0.160.0031.99816.77
8.0.150.0071.99516.66
8.0.140.0032.00016.71
8.0.130.0071.99713.31
8.0.120.0071.99616.84
8.0.110.0002.00116.75
8.0.100.0002.00416.72
8.0.90.0002.00216.79
8.0.80.0131.98916.82
8.0.70.0002.00416.68
8.0.60.0071.99516.72
8.0.50.0002.00316.65
8.0.30.0141.99016.96
8.0.20.0081.99217.40
8.0.10.0032.00016.97
8.0.00.0291.97016.50
7.4.330.0071.99415.00
7.4.320.0071.99516.29
7.4.300.0131.98916.39
7.4.290.0271.97716.47
7.4.280.0131.99316.28
7.4.270.0031.99816.39
7.4.260.0071.99216.43
7.4.250.0031.99816.42
7.4.240.0031.99916.39
7.4.230.0032.00016.26
7.4.220.0131.92816.50
7.4.210.0261.97316.43
7.4.200.0002.00216.45
7.4.190.0031.99916.54
7.4.160.0271.97116.36
7.4.150.0072.00117.40
7.4.140.0161.99317.86
7.4.130.0161.97416.41
7.4.120.0211.98216.35
7.4.110.0102.43516.58
7.4.100.0352.31116.43
7.4.90.0172.45516.36
7.4.80.0032.46619.39
7.4.70.0202.41216.31
7.4.60.0202.45516.29
7.4.50.0072.49216.28
7.4.40.0122.47722.77
7.4.30.0162.44316.49
7.4.00.0032.49314.93
7.3.330.0101.99313.04
7.3.320.0002.00813.01
7.3.310.0101.99716.13
7.3.300.0032.00016.30
7.3.290.0161.98616.16
7.3.280.0131.98616.22
7.3.270.0101.99817.40
7.3.260.0131.98916.39
7.3.250.0141.96216.22
7.3.240.0131.98916.22
7.3.230.0292.36116.39
7.3.210.0132.44416.32
7.3.200.0102.44919.39
7.3.190.0132.42916.53
7.3.180.0232.21616.10
7.3.170.0122.43316.27
7.3.160.0062.46116.14
7.3.120.0102.48514.65
7.2.330.0162.44816.65
7.2.320.0202.43116.51
7.2.310.0232.37416.67
7.2.300.0342.33116.50
7.2.290.0132.45016.41
7.2.60.0002.49716.72
7.2.00.0072.49419.13
7.1.200.0002.49315.86
7.1.100.0072.49418.19
7.1.70.0032.49817.07
7.1.60.0132.48819.82
7.1.50.0132.48816.76
7.1.00.0132.48722.22
7.0.200.0072.49416.76
7.0.140.0072.49322.09
7.0.100.0102.49019.88
7.0.90.0102.49019.85
7.0.80.0132.48719.82
7.0.70.0002.50019.94
7.0.60.0132.48719.94
7.0.50.0202.48020.31
7.0.40.0032.49719.96
7.0.30.0072.49320.10
7.0.20.0032.49720.04
7.0.10.0102.49020.08
7.0.00.0032.49720.14
5.6.250.0072.49320.73
5.6.240.0102.49020.62
5.6.230.0102.49020.61
5.6.220.0072.49320.56
5.6.210.0102.49020.39
5.6.200.0072.49320.88
5.6.190.0172.48320.96
5.6.180.0072.49321.00
5.6.170.0102.49021.04
5.6.160.0032.49720.99
5.6.150.0072.49321.07
5.6.140.0032.49720.99
5.6.130.0132.48720.98
5.6.120.0102.49020.96
5.6.110.0172.48320.91
5.6.100.0102.49020.94
5.6.90.0002.50020.89
5.6.80.0072.49320.36
5.6.70.0072.49320.43
5.6.60.0002.50020.43
5.6.50.0072.49320.39
5.6.40.0072.49320.28
5.6.30.0202.48020.28
5.6.20.0032.49720.40
5.6.10.0002.50020.25
5.6.00.0202.48020.36
5.5.380.0102.49020.30
5.5.370.0102.49020.39
5.5.360.0032.49720.36
5.5.350.0032.49720.41
5.5.340.0132.48720.74
5.5.330.0072.49320.88
5.5.320.0032.49720.69
5.5.310.0072.49320.81
5.5.300.1372.36320.81
5.5.290.0072.49320.84
5.5.280.0102.49020.75
5.5.270.0132.48720.82
5.5.260.0072.49320.75
5.5.250.0032.49720.59
5.5.240.0032.49720.14
5.5.230.0072.49320.13
5.5.220.0002.50020.20
5.5.210.0072.49320.13
5.5.200.0002.50020.23
5.5.190.0002.50020.08
5.5.180.0102.49020.10
5.5.160.0172.48319.91
5.5.150.0002.50020.06
5.5.140.0002.50020.11
5.5.130.0072.49320.13
5.5.120.0102.49020.10
5.5.110.0172.48320.07
5.5.100.0072.49320.12
5.5.90.0002.50019.96
5.5.80.0172.48320.06
5.5.70.0132.48720.02
5.5.60.0132.48720.05
5.5.50.0002.50019.96
5.5.40.0102.49020.10
5.5.30.0032.49720.00
5.5.20.0072.47319.94
5.5.10.0032.49719.88
5.5.00.0032.48319.98
5.4.450.0102.49019.26
5.4.440.0072.49319.31
5.4.430.0072.49319.30
5.4.420.0202.48019.35
5.4.410.0072.49319.16
5.4.400.0102.49018.98
5.4.390.0032.49718.90
5.4.380.0102.49018.79
5.4.370.0032.49718.98
5.4.360.0072.49318.76
5.4.350.0002.50018.82
5.4.340.0032.49718.76
5.4.320.0132.48718.93
5.4.310.0072.49318.98
5.4.300.0002.50018.88
5.4.290.0102.49018.98
5.4.280.0202.48018.75
5.4.270.0132.48718.98
5.4.260.0102.49018.91
5.4.250.0072.49318.86
5.4.240.0102.49019.04
5.4.230.0032.49718.75
5.4.220.0072.49319.02
5.4.210.0032.49719.00
5.4.200.0132.48718.89
5.4.190.0132.48718.89
5.4.180.0102.49019.07
5.4.170.0032.49718.81
5.4.160.0102.49018.96
5.4.150.0072.49318.91
5.4.140.0102.26016.33
5.4.130.0032.49716.24
5.4.120.0102.49016.11
5.4.110.0072.49316.24
5.4.100.0032.49716.38
5.4.90.0072.49316.20
5.4.80.0072.49316.24
5.4.70.0032.49716.13
5.4.60.0102.49016.30
5.4.50.0102.49016.23
5.4.40.0032.49716.18
5.4.30.0032.49716.22
5.4.20.0072.49316.39
5.4.10.0102.49016.19
5.4.00.0002.50015.74
5.3.290.0072.49314.45
5.3.280.0072.49314.41
5.3.270.0072.49314.29
5.3.260.0032.49714.38
5.3.250.0072.49314.39
5.3.240.0032.49714.31
5.3.230.0072.49314.44
5.3.220.0102.49014.38
5.3.210.0102.49014.30
5.3.200.0072.49314.36
5.3.190.0072.49314.38
5.3.180.0072.49314.34
5.3.170.0102.49014.40
5.3.160.0002.50014.30
5.3.150.0072.49314.38
5.3.140.0072.49314.22
5.3.130.0002.50014.21
5.3.120.0072.49314.38
5.3.110.0072.49314.23
5.3.100.0072.49313.86
5.3.90.0072.49313.68
5.3.80.0032.49713.70
5.3.70.0102.49013.74
5.3.60.0102.49013.73
5.3.50.0072.49313.71
5.3.40.0072.49313.72
5.3.30.0072.49313.64
5.3.20.0032.49713.36
5.3.10.0002.50013.26
5.3.00.0132.48713.41
5.2.170.0000.03311.11
5.2.160.0070.06311.19
5.2.150.0000.03311.14
5.2.140.0000.03711.10
5.2.130.0070.02010.89
5.2.120.0030.02711.02
5.2.110.0070.06311.06
5.2.100.0070.06011.13
5.2.90.0030.06011.10
5.2.80.0030.05011.16
5.2.70.0130.03311.16
5.2.60.0070.06010.97
5.2.50.0100.04311.01
5.2.40.0000.06710.95
5.2.30.0070.06011.01
5.2.20.0030.06310.80
5.2.10.0170.05010.74
5.2.00.0070.05710.79
5.1.60.0030.05710.02
5.1.50.0030.05310.04
5.1.40.0030.0539.97
5.1.30.0070.05310.30
5.1.20.0100.02710.38
5.1.10.0200.04710.04
5.1.00.0070.04710.05
5.0.50.0030.0478.60
5.0.40.0000.0478.41
5.0.30.0070.0638.29
5.0.20.0000.0278.20
5.0.10.0000.0438.25
5.0.00.0000.0678.24
4.4.90.0000.0378.04
4.4.80.0030.0338.04
4.4.70.0070.0308.04
4.4.60.0070.0238.04
4.4.50.0070.0338.04
4.4.40.0030.0408.04
4.4.30.0000.0238.04
4.4.20.0000.0378.04
4.4.10.0000.0378.04
4.4.00.0000.0578.04
4.3.110.0000.0278.04
4.3.100.0030.0338.04
4.3.90.0030.0208.04
4.3.80.0030.0508.04
4.3.70.0000.0338.04
4.3.60.0070.0178.04
4.3.50.0070.0308.04
4.3.40.0000.0538.04
4.3.30.0070.0308.04
4.3.20.0070.0338.04
4.3.10.0000.0378.04
4.3.00.0000.0308.04

preferences:
44.24 ms | 401 KiB | 5 Q