3v4l.org

run code in 300+ PHP versions simultaneously
<?php function gen() { // TODO: HHVM currently does not support yield from (or yield) as // expressions. As such, this test had to be slightly modified. // The original line was: // var_dump(yield from gen($a + 1)); //$b = yield from gen($a + 1); yield 1; yield 2; var_dump('in the middle of gen'); yield 3; yield 4; } function bar($gen) { // TODO: HHVM currently does not support yield from (or yield) as // expressions. As such, this test had to be slightly modified. // The original line was: // var_dump(yield from gen($a + 1)); yield from $gen; } /* Twice a Generator from bar() using yield from on $gen */ $gen = gen(); $gens[] = bar($gen); $gens[] = bar($gen); do { foreach ($gens as $g) { var_dump($g->current()); $g->next(); } } while($gens[0]->valid()); var_dump($gens[1]->valid());

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.0150.00316.63
8.3.50.0120.00921.98
8.3.40.0070.00718.80
8.3.30.0140.00018.70
8.3.20.0000.00720.10
8.3.10.0080.00023.71
8.3.00.0040.00419.38
8.2.180.0110.00716.50
8.2.170.0110.00422.96
8.2.160.0130.00721.12
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0060.00317.75
8.2.120.0070.00026.35
8.2.110.0040.00422.23
8.2.100.0040.00718.05
8.2.90.0040.00419.30
8.2.80.0000.00817.97
8.2.70.0050.00517.50
8.2.60.0000.00817.93
8.2.50.0060.00318.07
8.2.40.0050.00219.38
8.2.30.0080.00020.56
8.2.20.0040.00417.75
8.2.10.0000.00818.04
8.2.00.0030.00718.01
8.1.280.0140.00025.92
8.1.270.0000.00824.01
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0040.00422.65
8.1.230.0080.00417.78
8.1.220.0040.00417.76
8.1.210.0030.00518.77
8.1.200.0030.00617.11
8.1.190.0080.00017.22
8.1.180.0040.00418.10
8.1.170.0030.00618.63
8.1.160.0050.00222.07
8.1.150.0040.00418.77
8.1.140.0050.00319.53
8.1.130.0020.00517.59
8.1.120.0040.00417.38
8.1.110.0070.00017.35
8.1.100.0040.00417.52
8.1.90.0070.00017.49
8.1.80.0060.00317.42
8.1.70.0030.00317.45
8.1.60.0080.00017.60
8.1.50.0000.00817.57
8.1.40.0080.00017.53
8.1.30.0040.00417.57
8.1.20.0050.00217.69
8.1.10.0000.00717.63
8.1.00.0000.00917.59
8.0.300.0040.00418.77
8.0.290.0050.00216.75
8.0.280.0040.00418.50
8.0.270.0000.00717.19
8.0.260.0060.00017.27
8.0.250.0040.00417.00
8.0.240.0040.00417.01
8.0.230.0040.00416.95
8.0.220.0050.00316.84
8.0.210.0080.00016.80
8.0.200.0030.00316.83
8.0.190.0040.00416.90
8.0.180.0040.00416.90
8.0.170.0030.00916.78
8.0.160.0000.00716.91
8.0.150.0080.00016.80
8.0.140.0080.00016.86
8.0.130.0000.00813.34
8.0.120.0040.00416.82
8.0.110.0030.00516.88
8.0.100.0000.00716.70
8.0.90.0040.00416.77
8.0.80.0110.01116.88
8.0.70.0050.00316.84
8.0.60.0070.00016.79
8.0.50.0040.00416.86
8.0.30.0120.00717.00
8.0.20.0090.01117.40
8.0.10.0040.00417.14
8.0.00.0050.01216.71
7.4.330.0050.00016.77
7.4.320.0000.00716.51
7.4.300.0000.00616.50
7.4.290.0070.00016.62
7.4.280.0030.00516.65
7.4.270.0030.00316.67
7.4.260.0030.00316.57
7.4.250.0040.00416.52
7.4.240.0050.00216.49
7.4.230.0030.00316.45
7.4.220.0040.01316.71
7.4.210.0070.00816.55
7.4.200.0070.00016.55
7.4.160.0150.00316.46
7.4.150.0140.00317.40
7.4.140.0150.00517.86
7.4.130.0100.01016.57
7.4.120.0130.00816.54
7.4.110.0090.00916.63
7.4.100.0060.01216.46
7.4.90.0090.00916.35
7.4.80.0100.01319.39
7.4.70.0060.01116.43
7.4.60.0030.01316.50
7.4.50.0070.01116.36
7.4.40.0130.00316.59
7.4.30.0120.01016.55
7.4.00.0090.00614.63
7.3.330.0000.00613.21
7.3.320.0000.00613.37
7.3.310.0040.00416.40
7.3.300.0000.00716.37
7.3.290.0000.00716.18
7.3.280.0060.01016.31
7.3.270.0140.00317.40
7.3.260.0120.00316.28
7.3.250.0100.00916.43
7.3.240.0100.00916.47
7.3.230.0060.01016.39
7.3.210.0090.00916.53
7.3.200.0160.00916.51
7.3.190.0090.00916.70
7.3.180.0060.01016.35
7.3.170.0060.00916.52
7.3.160.0140.00316.39
7.2.330.0090.00916.43
7.2.320.0120.00616.75
7.2.310.0130.00316.88
7.2.300.0060.01216.69
7.2.290.0060.01516.58
7.2.60.0090.00616.63
7.2.00.0100.00319.54
7.1.200.0000.01015.80
7.1.100.0000.01518.39
7.1.70.0000.00817.34
7.1.60.0070.01319.48
7.1.50.0040.01916.89
7.1.00.0030.07722.45
7.0.200.0170.00314.55
7.0.60.0070.06720.01
7.0.50.0100.08317.99
7.0.40.0030.05720.24
7.0.30.0130.04720.20
7.0.20.0230.07720.22
7.0.10.0070.06320.16
7.0.00.0070.04720.16
5.6.280.0070.03720.84
5.6.210.0000.07720.57
5.6.200.0030.05718.15
5.6.190.0000.04320.61
5.6.180.0330.07320.48
5.6.170.0430.06320.46
5.6.160.0030.09020.71
5.6.150.0100.03318.15
5.6.140.0070.04718.21
5.6.130.0100.03318.23
5.6.120.0170.07721.02
5.6.110.0070.07720.98
5.6.100.0100.05321.09
5.6.90.0030.06021.11
5.6.80.0100.06320.41
5.5.350.3930.04020.44
5.5.340.0100.07718.01
5.5.330.0100.03720.44
5.5.320.0000.06720.35
5.5.310.0130.05020.30
5.5.300.0030.06017.99
5.5.290.0130.06017.96
5.5.280.0000.08720.77
5.5.270.0070.07320.80
5.5.260.0130.06020.89
5.5.250.0030.07020.69
5.5.240.0230.04020.07

preferences:
59.71 ms | 401 KiB | 5 Q