3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* How many times the code under test should run in each function */ define('LOOP',10000); function f1() { for($i=0; $i<LOOP; ++$i) { foreach (range(0, 100) as $i) { //echo $i . PHP_EOL; } } } $start = microtime(true); f1(); $stop = microtime(true); $time1 = $stop - $start;

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)
7.1.70.0102.49117.04
7.1.60.0072.49519.32
7.1.50.0102.49116.72
7.1.00.0072.49322.32
7.0.200.0002.50116.90
7.0.140.0102.49022.00
7.0.100.0032.48019.86
7.0.90.0102.49019.86
7.0.80.0132.48719.96
7.0.70.0072.49319.82
7.0.60.0132.48719.90
7.0.50.2072.29320.29
7.0.40.0072.49320.14
7.0.30.0102.49020.11
7.0.20.0032.49720.06
7.0.10.0072.49319.91
7.0.00.0072.49320.01
5.6.280.0032.49720.99
5.6.250.0002.50020.79
5.6.240.0032.49720.54
5.6.230.0102.49020.63
5.6.220.0172.48320.63
5.6.210.2332.26720.54
5.6.200.0072.49320.99
5.6.190.0102.49020.91
5.6.180.0072.49321.09
5.6.170.0132.48721.07
5.6.160.0072.49321.05
5.6.150.0132.48721.09
5.6.140.0102.49021.01
5.6.130.0132.48721.07
5.6.120.0132.48721.05
5.6.110.0072.49321.07
5.6.100.0102.49020.97
5.6.90.0172.48321.01
5.6.80.0172.48320.46
5.6.70.0072.49320.36
5.6.60.0072.49320.42
5.6.50.0002.50020.30
5.6.40.0172.47020.34
5.6.30.0072.49320.36
5.6.20.0072.49320.33
5.6.10.0072.48020.49
5.6.00.0072.49320.48
5.5.380.0102.49020.41
5.5.370.0072.49320.41
5.5.360.0102.49020.53
5.5.350.0072.49320.39
5.5.340.0072.49320.83
5.5.330.0032.49720.80
5.5.320.0032.49720.84
5.5.310.0102.49020.86
5.5.300.0132.48720.84
5.5.290.0002.50020.89
5.5.280.0002.50020.85
5.5.270.0072.49320.86
5.5.260.0072.49320.79
5.5.250.0132.47320.58
5.5.240.0032.49720.28
5.5.230.0072.49320.26
5.5.220.0032.49720.12
5.5.210.0032.48019.96
5.5.200.0102.49020.12
5.5.190.0032.49720.08
5.5.180.0032.49720.18
5.5.160.0132.48720.21
5.5.150.0102.49020.15
5.5.140.0032.49720.07
5.5.130.0102.49020.12
5.5.120.0102.49020.12
5.5.110.0102.49019.95
5.5.100.0102.49019.95
5.5.90.0032.49719.98
5.5.80.0072.49320.04
5.5.70.0072.49320.04
5.5.60.0072.49320.03
5.5.50.0102.49020.00
5.5.40.0102.49020.03
5.5.30.0172.48320.02
5.5.20.0072.49320.02
5.5.10.0072.49319.97
5.5.00.0032.49720.02
5.4.450.0002.44719.41
5.4.440.0032.49719.48
5.4.430.0102.49019.35
5.4.420.0032.49719.13
5.4.410.0032.49719.14
5.4.400.0032.49719.00
5.4.390.0132.48718.90
5.4.380.0102.49019.01
5.4.370.0002.50018.96
5.4.360.0132.48718.84
5.4.350.0032.49718.84
5.4.340.0072.49318.99
5.4.320.0002.50018.84
5.4.310.1832.31719.03
5.4.300.0132.48719.00
5.4.290.0172.48318.99
5.4.280.0072.49318.96
5.4.270.0002.50019.15
5.4.260.0172.48318.98
5.4.250.0102.49019.00
5.4.240.0102.49019.12
5.4.230.0032.49719.02
5.4.220.0032.49718.96
5.4.210.0072.49319.00
5.4.200.0172.48318.97
5.4.190.0032.49719.05
5.4.180.0032.49718.96
5.4.170.0032.47719.05
5.4.160.0032.49719.06
5.4.150.0072.49318.97
5.4.140.0002.46316.14
5.4.130.0032.49716.35
5.4.120.0072.49316.36
5.4.110.0072.49316.32
5.4.100.0072.49316.46
5.4.90.1402.36016.32
5.4.80.0072.49316.29
5.4.70.0002.50016.40
5.4.60.0072.49316.43
5.4.50.0002.50016.36
5.4.40.0072.49316.38
5.4.30.0072.49316.39
5.4.20.0032.49716.38
5.4.10.0102.49016.40
5.4.00.1572.34315.80
5.3.290.0132.48714.62
5.3.280.0072.49314.33
5.3.270.0002.50014.52
5.3.260.0072.49314.51
5.3.250.0102.49014.48
5.3.240.0072.49314.38
5.3.230.0102.49014.50
5.3.220.0072.49314.42
5.3.210.0002.50014.34
5.3.200.0072.49314.41
5.3.190.0072.49314.38
5.3.180.0032.49714.45
5.3.170.0072.49314.45
5.3.160.0032.49714.31
5.3.150.0072.49314.48
5.3.140.0032.49714.31
5.3.130.0072.49314.32
5.3.120.0132.48714.53
5.3.110.0002.50014.40
5.3.100.0102.49013.86
5.3.90.0102.49013.87
5.3.80.0002.50013.87
5.3.70.0072.49313.73
5.3.60.0102.49013.79
5.3.50.0102.49013.65
5.3.40.0132.48713.81
5.3.30.0072.49313.80
5.3.20.0102.40313.54
5.3.10.0132.48713.55
5.3.00.0032.49713.53
5.2.170.2172.28310.94
5.2.160.0072.49310.76
5.2.150.0072.49310.94
5.2.140.0032.49710.83
5.2.130.0032.49710.81
5.2.120.0072.49310.73
5.2.110.0072.49310.72
5.2.100.0572.44310.95
5.2.90.0032.49710.88
5.2.80.0032.49710.97
5.2.70.0032.46310.94
5.2.60.0102.49010.80
5.2.50.0032.49710.72
5.2.40.0072.42310.74
5.2.30.0032.49710.76
5.2.20.0032.49710.72
5.2.10.0072.49310.76
5.2.00.0002.50010.66
5.1.60.0002.5009.82
5.1.50.0002.5009.75
5.1.40.0002.5009.91
5.1.30.0072.49010.30
5.1.20.0072.49310.24
5.1.10.0072.4939.98
5.1.00.0072.4939.96
5.0.50.0072.4938.23
5.0.40.0072.4938.22
5.0.30.0032.4978.12
5.0.20.0072.4938.15
5.0.10.0032.4978.09
5.0.00.0032.4977.98
4.4.90.0002.5007.58
4.4.80.0072.4937.58
4.4.70.0002.4737.58
4.4.60.0072.4937.58
4.4.50.0102.4907.58
4.4.40.0032.4977.58
4.4.30.0032.4977.58
4.4.20.0032.4977.58
4.4.10.0002.5007.58
4.4.00.0002.4807.58
4.3.110.0102.4907.58
4.3.100.0032.4977.58
4.3.90.0072.4936.69
4.3.80.0002.5006.69
4.3.70.0002.5006.69
4.3.60.0032.4976.69
4.3.50.0002.5006.69
4.3.40.0072.4936.69
4.3.30.0002.5006.69
4.3.20.0032.4976.69
4.3.10.0002.5006.69
4.3.00.0032.4976.69

preferences:
33.27 ms | 401 KiB | 5 Q