3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function g1() { yield 1; yield 2; } function g2() { $a = yield; yield "a"; var_dump($a); $b = yield; yield "b"; var_dump($b); } $g1=g1(); $g2=g2(); foreach($g1 as $v) { var_dump($g2->send($v)); }
based on 7Ufga

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.00.0190.00418.97
7.1.200.0060.00615.52
7.1.100.0430.00915.79
7.1.70.0000.01317.20
7.1.60.0080.00819.46
7.1.50.0140.00416.89
7.1.00.0100.07022.35
7.0.200.0070.00316.53
7.0.140.0030.03322.12
7.0.110.0100.07320.08
7.0.100.0130.07020.13
7.0.90.0100.08019.95
7.0.80.0100.07719.89
7.0.70.0030.05020.07
7.0.60.0100.07019.65
7.0.50.0000.08319.96
7.0.40.0000.09019.69
7.0.30.0100.03719.74
7.0.20.0030.08019.83
7.0.10.0030.08319.82
7.0.00.0130.07719.87
5.6.280.0070.07020.91
5.6.260.0070.04720.74
5.6.250.0100.07720.75
5.6.240.0100.07320.64
5.6.230.0070.06320.71
5.6.220.0070.08020.68
5.6.210.0100.07720.82
5.6.200.0100.08320.66
5.6.190.0030.08320.62
5.6.180.0070.03320.60
5.6.170.0100.08020.71
5.6.160.0000.08020.62
5.6.150.0030.05320.86
5.6.140.0100.07720.61
5.6.130.0030.07720.61
5.6.120.0070.09020.61
5.6.110.0030.08020.63
5.6.100.0030.08320.54
5.6.90.0070.06720.62
5.6.80.0100.07020.00
5.6.70.0070.08320.02
5.6.60.0070.05019.94
5.6.50.0170.04720.02
5.6.40.0100.07019.92
5.6.30.0030.05319.92
5.6.20.0070.07320.01
5.6.10.0100.07719.88
5.6.00.0130.07020.05
5.5.380.0030.08017.55
5.5.370.0100.07717.70
5.5.360.0200.06717.59
5.5.350.0070.08017.50
5.5.340.0000.06018.10
5.5.330.0100.07018.25
5.5.320.0130.07718.05
5.5.310.0100.08018.11
5.5.300.0130.07718.13
5.5.290.0100.06717.91
5.5.280.0070.07718.09
5.5.270.0100.07718.21
5.5.260.0100.07717.92
5.5.250.0130.07318.06
5.5.240.0070.07317.22
5.5.230.0100.07317.65
5.5.220.0070.07317.32
5.5.210.0130.07317.50
5.5.200.0030.06717.29
5.5.190.0130.07317.29
5.5.180.0100.07317.58
5.5.160.0000.04717.45
5.5.150.0070.07017.23
5.5.140.0030.04317.58
5.5.130.0070.08317.57
5.5.120.0130.05717.26
5.5.110.0030.03317.57
5.5.100.0030.07717.49
5.5.90.0030.05717.20
5.5.80.0070.07017.10
5.5.70.0030.05017.36
5.5.60.0070.07017.38
5.5.50.0030.04717.46
5.5.40.0030.07317.07
5.5.30.0100.06317.47
5.5.20.0100.07317.36
5.5.10.0100.07317.49
5.5.00.0070.08317.45
5.4.450.0070.08319.35
5.4.440.0030.08019.33
5.4.430.0170.06719.30
5.4.420.0100.07719.36
5.4.410.0070.07319.38
5.4.400.0100.07019.23
5.4.390.0000.06719.02
5.4.380.0030.07019.11
5.4.370.0070.07718.98
5.4.360.0030.07719.24
5.4.350.0100.06719.34
5.4.340.0030.08018.98
5.4.320.0100.07019.09
5.4.310.0000.08019.34
5.4.300.0030.08019.00
5.4.290.0100.04018.99
5.4.280.0170.05718.98
5.4.270.0030.07018.97
5.4.260.0100.07319.01
5.4.250.0130.06319.02
5.4.240.0030.06019.15
5.4.230.0000.07719.33
5.4.220.0000.05019.23
5.4.210.0000.08019.02
5.4.200.0100.06319.14
5.4.190.0130.03718.97
5.4.180.0100.07019.32
5.4.170.0030.06019.16
5.4.160.0070.07318.98
5.4.150.0030.07719.31
5.4.140.0100.06016.32
5.4.130.0070.07016.32
5.4.120.0070.04016.36
5.4.110.0130.04316.50
5.4.100.0000.07716.26
5.4.90.0130.03016.56
5.4.80.0070.04016.39
5.4.70.0030.03716.44
5.4.60.0070.03316.53
5.4.50.0030.03016.34
5.4.40.0000.03316.60
5.4.30.0000.03716.33
5.4.20.0000.03716.23
5.4.10.0100.04716.29
5.4.00.0000.04015.95
5.3.290.0100.07014.70
5.3.280.0130.06714.62
5.3.270.0100.07014.60
5.3.260.0070.06714.70
5.3.250.0170.06314.62
5.3.240.0100.06714.61
5.3.230.0000.04714.57
5.3.220.0100.07014.45
5.3.210.0030.06314.80
5.3.200.0000.04014.70
5.3.190.0030.03714.59
5.3.180.0030.03714.57
5.3.170.0170.03314.56
5.3.160.0030.03714.54
5.3.150.0000.06714.65
5.3.140.0000.04714.64
5.3.130.0070.04014.78
5.3.120.0070.04014.51
5.3.110.0030.04714.56
5.3.100.0000.06014.05
5.3.90.0030.04013.89
5.3.80.0030.03714.00
5.3.70.0070.04013.87
5.3.60.0030.03713.97
5.3.50.0030.05714.00
5.3.40.0000.04013.95
5.3.30.0030.06714.04
5.3.20.0000.04313.66
5.3.10.0000.03713.66
5.3.00.0070.03313.77
5.2.170.0000.04011.85
5.2.160.0070.02711.85
5.2.150.0070.02311.85
5.2.140.0030.02711.85
5.2.130.0000.03011.85
5.2.120.0030.02711.85
5.2.110.0030.05011.85
5.2.100.0000.03311.85
5.2.90.0000.03011.85
5.2.80.0070.02311.85
5.2.70.0070.02311.85
5.2.60.0070.02311.85
5.2.50.0000.03311.85
5.2.40.0000.02711.85
5.2.30.0000.02711.85
5.2.20.0000.03711.85
5.2.10.0070.02311.85
5.2.00.0030.02711.85
5.1.60.0030.02011.85
5.1.50.0000.02311.85
5.1.40.0030.02011.85
5.1.30.0000.03011.85
5.1.20.0000.02711.85
5.1.10.0030.02711.85
5.1.00.0000.02711.85
5.0.50.0000.02011.85
5.0.40.0030.02011.85
5.0.30.0000.02711.85
5.0.20.0030.01711.85
5.0.10.0000.02011.85
5.0.00.0000.03011.85
4.4.90.0000.01311.85
4.4.80.0000.02011.85
4.4.70.0000.01711.85
4.4.60.0000.01311.85
4.4.50.0030.01311.85
4.4.40.0000.02011.85
4.4.30.0000.01711.85
4.4.20.0000.01711.85
4.4.10.0000.02011.85
4.4.00.0000.02311.85
4.3.110.0030.01311.85
4.3.100.0000.01311.85
4.3.90.0000.02011.85
4.3.80.0000.02311.85
4.3.70.0030.01311.85
4.3.60.0070.01711.85
4.3.50.0000.01311.85
4.3.40.0000.02011.85
4.3.30.0000.01311.85
4.3.20.0000.01311.85
4.3.10.0000.01711.85
4.3.00.0030.01311.85