3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function generate() { try { yield 1; yield 2; } finally { echo "finally\n"; } } foreach (generate() as $i) { echo $i, "\n"; throw new Exception(); }

Here you find the average performance (time & memory) of each version. A greyed out version indicates it didn't complete successfully (based on exit-code).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.2.00.0100.00319.41
7.1.100.0060.00618.04
7.1.70.0100.00617.11
7.1.60.0120.01219.50
7.1.50.0090.01216.93
7.1.00.0030.07722.54
7.0.200.0030.00616.76
7.0.110.0130.05019.98
7.0.100.0170.04020.04
7.0.90.0430.03019.89
7.0.80.0370.04019.89
7.0.70.0570.05719.84
7.0.60.0500.08720.04
7.0.50.0530.04319.91
7.0.40.0100.03019.66
7.0.30.0030.05319.82
7.0.20.0070.06719.78
7.0.10.0130.03719.64
7.0.00.0000.05019.74
5.6.280.0030.07321.08
5.6.260.0030.03720.61
5.6.250.0000.04020.62
5.6.240.0070.03020.70
5.6.230.0030.03720.56
5.6.220.0100.07020.46
5.6.210.0000.05720.73
5.6.200.0070.07320.66
5.6.190.0030.03320.55
5.6.180.0070.05020.68
5.6.170.0070.06720.70
5.6.160.0100.03020.64
5.6.150.0170.06020.86
5.6.140.0030.06320.70
5.6.130.0070.06020.46
5.6.120.0000.04720.61
5.6.110.0000.04720.44
5.6.100.0030.06720.64
5.6.90.0100.07020.59
5.6.80.0030.03320.04
5.6.70.0070.04719.98
5.6.60.0100.05319.96
5.6.50.0100.06320.02
5.6.40.0030.04320.00
5.6.30.0070.08320.01
5.6.20.0100.03019.96
5.6.10.0000.07320.01
5.6.00.0130.06720.05
5.5.380.0070.03717.63
5.5.370.0030.04317.59
5.5.360.0200.07317.57
5.5.350.0070.05717.61
5.5.340.0070.07018.09
5.5.330.0070.03017.96
5.5.320.0070.03718.05
5.5.310.0070.05018.09
5.5.300.0000.04317.95
5.5.290.0030.04318.25
5.5.280.0070.03718.13
5.5.270.0100.03318.23
5.5.260.0100.03318.25
5.5.250.0070.08317.91
5.5.240.0070.04717.64
5.5.230.0030.07317.64
5.5.220.0030.04717.60
5.5.210.0100.07717.60
5.5.200.0000.04717.25
5.5.190.0030.04317.28
5.5.180.0070.07717.61
5.5.160.0030.07317.40
5.5.150.0030.03717.45
5.5.140.0070.04717.26
5.5.130.0030.04717.48
5.5.120.0000.04017.30
5.5.110.0000.04017.48
5.5.100.0030.03717.39
5.5.90.0030.04017.38
5.5.80.0100.06717.18
5.5.70.0070.03017.38
5.5.60.0000.03317.46
5.5.50.0000.04017.37
5.5.40.0000.08017.07
5.5.30.0030.07317.34
5.5.20.0030.03717.29
5.5.10.0100.05017.15
5.5.00.0030.04717.16
5.4.450.0100.03719.51
5.4.440.0030.04719.34
5.4.430.0070.05719.32
5.4.420.0030.04019.41
5.4.410.0100.07319.34
5.4.400.0000.04019.09
5.4.390.0030.06018.96
5.4.380.0100.04718.98
5.4.370.0030.03319.00
5.4.360.0070.08319.05
5.4.350.0030.06719.31
5.4.340.0000.04318.95
5.4.320.0000.04319.31
5.4.310.0000.06719.37
5.4.300.0000.04019.03
5.4.290.0030.03319.23
5.4.280.0030.03719.00
5.4.270.0030.03719.02
5.4.260.0070.06719.13
5.4.250.0130.02719.30
5.4.240.0070.04719.01
5.4.230.0130.05319.01
5.4.220.0030.03319.13
5.4.210.0030.04018.94
5.4.200.0000.03719.31
5.4.190.0070.03019.00
5.4.180.0030.03319.01
5.4.170.0070.06319.17
5.4.160.0070.07019.33
5.4.150.0200.06018.97
5.4.140.0030.06016.43
5.4.130.0030.07016.53
5.4.120.0100.03316.38
5.4.110.0000.03316.55
5.4.100.0030.07316.59
5.4.90.0030.03716.46
5.4.80.0030.04016.40
5.4.70.0030.07716.30
5.4.60.0070.07316.39
5.4.50.0030.06716.47
5.4.40.0030.07316.62
5.4.30.0000.03316.56
5.4.20.0030.04316.44
5.4.10.0070.05716.41
5.4.00.0070.04016.01
5.3.290.0070.03314.80
5.3.280.0000.03314.62
5.3.270.0030.06014.62
5.3.260.0070.03014.58
5.3.250.0070.05714.61
5.3.240.0030.07714.75
5.3.230.0070.05314.83
5.3.220.0030.03314.80
5.3.210.0000.05314.57
5.3.200.0070.06714.58
5.3.190.0100.07014.56
5.3.180.0100.06714.56
5.3.170.0030.04014.59
5.3.160.0070.07714.71
5.3.150.0030.03714.64
5.3.140.0030.05014.79
5.3.130.0030.06314.68
5.3.120.0030.08014.78
5.3.110.0070.06714.57
5.3.100.0070.06713.99
5.3.90.0030.05714.02
5.3.80.0100.05314.09
5.3.70.0070.04714.10
5.3.60.0230.05314.00
5.3.50.0000.04014.02
5.3.40.0100.06313.95
5.3.30.0030.04013.90
5.3.20.0100.03313.72
5.3.10.0000.06713.66
5.3.00.0130.03013.49
5.2.170.0070.06311.96
5.2.160.0000.04711.96
5.2.150.0070.04011.96
5.2.140.0070.06711.96
5.2.130.0100.05311.96
5.2.120.0100.05011.96
5.2.110.0100.05311.96
5.2.100.0070.03711.96
5.2.90.0030.03011.96
5.2.80.0070.04011.96
5.2.70.0070.05311.96
5.2.60.0100.02711.96
5.2.50.0070.05011.96
5.2.40.0070.04011.96
5.2.30.0000.03011.96
5.2.20.0030.04011.96
5.2.10.0000.04311.96
5.2.00.0030.03011.96
5.1.60.0030.02311.96
5.1.50.0000.03011.96
5.1.40.0130.02011.96
5.1.30.0000.04711.96
5.1.20.0000.03311.96
5.1.10.0030.02711.96
5.1.00.0000.02711.96
5.0.50.0070.02011.96
5.0.40.0000.03311.96
5.0.30.0030.04711.96
5.0.20.0000.04311.96
5.0.10.0100.03011.96
5.0.00.0000.07011.96
4.4.90.0000.01711.96
4.4.80.0100.02011.96
4.4.70.0000.02711.96
4.4.60.0070.03011.96
4.4.50.0000.02311.96
4.4.40.0070.02011.96
4.4.30.0000.01711.96
4.4.20.0030.01311.96
4.4.10.0000.02011.96
4.4.00.0000.05311.96
4.3.110.0000.02011.96
4.3.100.0030.02311.96
4.3.90.0030.02711.96
4.3.80.0070.02711.96
4.3.70.0070.02311.96
4.3.60.0030.02311.96
4.3.50.0000.01711.96
4.3.40.0030.02311.96
4.3.30.0030.02311.96
4.3.20.0030.02711.96
4.3.10.0000.03311.96
4.3.00.0000.02711.96