3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function generateAndConsume() { yield 1; yield 2; var_dump(yield); var_dump(yield); } $g = generateAndConsume(); foreach ($g as $v) { if (!$v) break; var_dump($v); } $g->send(3); $g->send(4);
based on BKMLm

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).
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.60.0140.00016.72
7.2.00.0040.00819.34
7.1.200.0060.00615.63
7.1.100.0070.00718.32
7.1.70.0040.00416.81
7.1.60.0000.01119.46
7.1.50.0130.01016.96
7.1.00.0070.07322.29
7.0.200.0000.00716.86
7.0.140.0000.04021.95
7.0.60.0070.03719.90
7.0.50.0100.07017.86
7.0.40.0030.04720.15
7.0.30.0500.08020.34
7.0.20.0330.07020.11
7.0.10.0230.04720.15
7.0.00.0070.04020.22
5.6.280.0100.07020.91
5.6.210.0130.07020.55
5.6.200.0130.03018.19
5.6.190.0030.04320.62
5.6.180.3700.04020.64
5.6.170.0270.07720.62
5.6.160.0070.08320.55
5.6.150.0030.04318.15
5.6.140.0030.05318.14
5.6.130.0100.03718.14
5.6.120.0170.04321.14
5.6.110.0030.08321.11
5.6.100.0130.08020.98
5.6.90.0100.07321.00
5.6.80.0100.07720.38
5.6.70.0430.05020.44
5.5.350.0300.07020.38
5.5.340.0070.04717.95
5.5.330.0030.05720.37
5.5.320.0500.04320.25
5.5.310.0200.07320.36
5.5.300.0100.06717.98
5.5.290.0070.08717.94
5.5.280.0000.09020.66
5.5.270.0030.05720.78
5.5.260.0130.07320.88
5.5.250.0070.04720.50
5.5.240.3030.03320.24
5.4.450.0970.05019.34
5.4.440.0830.06019.67
5.4.430.0630.05719.54
5.4.420.0800.05019.48
5.4.410.0800.04719.50
5.4.400.0500.04319.00
5.4.390.0200.07318.79
5.4.380.0270.07018.81
5.4.370.0200.05718.74
5.4.360.0130.05718.83
5.4.350.0170.05718.75
5.4.340.0300.04018.53
5.4.320.0200.06318.77
5.4.310.0130.06018.72
5.4.300.0130.05718.75
5.4.290.0230.05018.72
5.4.280.0270.04318.56
5.4.270.0200.05018.59
5.4.260.0200.05018.71
5.4.250.0200.05018.62
5.4.240.0270.04718.50
5.4.230.0070.06018.73
5.4.220.0270.04718.45
5.4.210.0200.05318.43
5.4.200.0230.04716.59
5.4.190.0170.05718.51
5.4.180.0070.07718.51
5.4.170.0170.05718.79
5.4.160.0200.05018.76
5.4.150.0200.05718.72
5.4.140.0230.05016.20
5.4.130.0200.05016.32
5.4.120.0270.04716.45
5.4.110.0270.04016.24
5.4.100.0100.06316.26
5.4.90.0170.05716.32
5.4.80.0170.05016.12
5.4.70.0230.04716.16
5.4.60.0230.04716.46
5.4.50.0200.05016.27
5.4.40.0300.04016.26
5.4.30.0300.05016.22
5.4.20.0230.04716.43
5.4.10.0330.05316.25
5.4.00.0130.05315.77
5.3.290.0300.04714.84
5.3.280.0200.05314.62
5.3.270.0130.06014.63
5.3.260.0200.05714.83
5.3.250.0200.05714.81
5.3.240.0200.05314.64
5.3.230.0200.05014.62
5.3.220.0270.04314.59
5.3.210.0200.05314.61
5.3.200.0130.05714.55
5.3.190.0270.05014.63
5.3.180.0170.06314.73
5.3.170.0270.06714.59
5.3.160.0100.06714.55
5.3.150.0230.05314.70
5.3.140.0230.05314.55
5.3.130.0200.06714.77
5.3.120.0300.05014.59
5.3.110.0200.07314.57
5.3.100.0200.05314.20
5.3.90.0200.05314.18
5.3.80.0200.05014.07
5.3.70.0300.04314.11
5.3.60.0100.06014.09
5.3.50.0100.06013.96
5.3.40.0170.05313.94
5.3.30.0130.05313.98
5.3.20.0100.06313.86
5.3.10.0200.05013.72
5.3.00.0200.05313.63
5.2.170.0200.04011.16
5.2.160.0370.03711.27
5.2.150.0100.04711.14
5.2.140.0200.04011.25
5.2.130.0130.04311.22
5.2.120.0100.04711.16
5.2.110.0170.04011.32
5.2.100.0070.05311.20
5.2.90.0130.04311.23
5.2.80.0130.04311.13
5.2.70.0300.04711.15
5.2.60.0130.04311.09
5.2.50.0100.04711.05
5.2.40.0100.04311.20
5.2.30.0130.04011.01
5.2.20.0170.05310.99
5.2.10.0130.04310.90
5.2.00.0130.04710.94
5.1.60.0200.02710.20
5.1.50.0130.03710.06
5.1.40.0170.03010.04
5.1.30.0130.03710.44
5.1.20.0200.03010.40
5.1.10.0130.03710.06
5.1.00.0100.03710.09
5.0.50.0070.0338.59
5.0.40.0100.0238.61
5.0.30.0030.0478.26
5.0.20.0130.0238.34
5.0.10.0070.0378.27
5.0.00.0030.0478.17
4.4.90.0070.0205.95
4.4.80.0030.0275.89
4.4.70.0100.0175.87
4.4.60.0070.0205.88
4.4.50.0070.0205.97
4.4.40.0070.0335.99
4.4.30.0100.0235.89
4.4.20.0030.0206.07
4.4.10.0030.0235.97
4.4.00.0130.0276.02
4.3.110.0130.0205.82
4.3.100.0000.0275.80
4.3.90.0000.0305.77
4.3.80.0000.0435.86
4.3.70.0100.0205.88
4.3.60.0030.0205.79
4.3.50.0030.0305.77
4.3.40.0330.0405.76
4.3.30.0200.0205.41
4.3.20.0130.0275.41
4.3.10.0130.0235.41
4.3.00.0130.0277.10