3v4l.org

run code in 300+ PHP versions simultaneously
<?php function gen1() { yield 1; echo "Sup from gen1\n"; yield 2; yield 3; } function gen2() { try { yield from gen1(); } catch (Exception $e) { echo "Sup from gen2!\n"; yield 10; } } function gen3() { yield from gen2(); } $g = gen3(); // Prime the generator $g->valid(); $g->next(); $g->throw(new Exception("Whoa there lassie")); $g->current();

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.0140.00416.63
8.3.50.0110.00318.17
8.3.40.0180.00418.71
8.3.30.0090.00618.85
8.3.20.0070.00020.13
8.3.10.0080.00023.45
8.3.00.0000.00919.38
8.2.180.0110.00716.63
8.2.170.0070.00722.96
8.2.160.0060.01220.35
8.2.150.0050.00324.18
8.2.140.0050.00324.66
8.2.130.0030.00620.43
8.2.120.0000.00826.35
8.2.110.0030.00622.20
8.2.100.0080.00418.04
8.2.90.0040.00419.22
8.2.80.0060.00317.97
8.2.70.0030.00617.48
8.2.60.0080.00017.93
8.2.50.0000.00818.07
8.2.40.0050.00219.21
8.2.30.0000.00720.54
8.2.20.0040.00717.57
8.2.10.0040.00418.05
8.2.00.0040.00417.93
8.1.280.0150.00025.92
8.1.270.0060.00323.92
8.1.260.0070.00028.09
8.1.250.0080.00028.09
8.1.240.0030.00622.47
8.1.230.0040.00817.76
8.1.220.0090.00017.74
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0040.00417.70
8.1.180.0050.00318.10
8.1.170.0080.00018.49
8.1.160.0040.00422.02
8.1.150.0000.00818.89
8.1.140.0000.00819.58
8.1.130.0030.00317.70
8.1.120.0040.00417.45
8.1.110.0040.00417.50
8.1.100.0000.01217.30
8.1.90.0000.00717.32
8.1.80.0040.00417.39
8.1.70.0000.00717.38
8.1.60.0030.00617.63
8.1.50.0080.00017.42
8.1.40.0000.00917.54
8.1.30.0040.00417.51
8.1.20.0040.00417.50
8.1.10.0050.00217.48
8.1.00.0060.00317.54
8.0.300.0000.00818.77
8.0.290.0030.00616.88
8.0.280.0040.00418.32
8.0.270.0070.00017.16
8.0.260.0040.00417.37
8.0.250.0080.00017.00
8.0.240.0030.00317.02
8.0.230.0000.00716.87
8.0.220.0030.00316.90
8.0.210.0050.00216.96
8.0.200.0000.00616.95
8.0.190.0050.00316.82
8.0.180.0000.00816.90
8.0.170.0040.00416.81
8.0.160.0000.00816.94
8.0.150.0030.00416.84
8.0.140.0000.00716.86
8.0.130.0060.00013.45
8.0.120.0070.00016.95
8.0.110.0000.00716.89
8.0.100.0040.00416.80
8.0.90.0000.00716.83
8.0.80.0100.00717.00
8.0.70.0000.00716.88
8.0.60.0050.00216.91
8.0.50.0050.00216.92
8.0.30.0090.00817.06
8.0.20.0110.00817.40
8.0.10.0000.00817.08
8.0.00.0100.00916.84
7.4.330.0000.00516.79
7.4.320.0000.00616.64
7.4.300.0030.00316.63
7.4.290.0030.00316.47
7.4.280.0090.00016.64
7.4.270.0050.00216.50
7.4.260.0050.00316.60
7.4.250.0070.00016.55
7.4.240.0060.00116.57
7.4.230.0000.00716.52
7.4.220.0030.02116.53
7.4.210.0030.01316.60
7.4.200.0050.00216.41
7.4.160.0090.00616.48
7.4.150.0090.00917.40
7.4.140.0150.00617.86
7.4.130.0100.01016.56
7.4.120.0080.01216.77
7.4.110.0060.01616.43
7.4.100.0140.00316.51
7.4.90.0100.00616.52
7.4.80.0130.01019.39
7.4.70.0060.01216.61
7.4.60.0130.00316.47
7.4.50.0080.00816.59
7.4.40.0130.00316.32
7.4.30.0150.00916.42
7.4.00.0040.01115.22
7.3.330.0030.00313.23
7.3.320.0000.00513.14
7.3.310.0040.00416.18
7.3.300.0030.00316.27
7.3.290.0090.00816.26
7.3.280.0100.00716.33
7.3.270.0060.01017.40
7.3.260.0270.01516.43
7.3.250.0110.00816.46
7.3.240.0100.00816.39
7.3.230.0030.01416.45
7.3.210.0200.00416.50
7.3.200.0060.01016.34
7.3.190.0070.00716.58
7.3.180.0060.01016.38
7.3.170.0150.00416.48
7.3.160.0090.01216.58
7.2.330.0120.00616.87
7.2.320.0100.01316.73
7.2.310.0090.00616.84
7.2.300.0090.00916.34
7.2.290.0040.01416.70
7.2.60.0070.00716.78
7.2.00.0060.00619.44
7.1.200.0100.00315.29
7.1.100.0000.01217.79
7.1.70.0100.00316.99
7.1.60.0060.01919.36
7.1.50.0100.01016.68
7.1.00.0100.06722.28
7.0.200.0030.00616.73
7.0.60.0000.05019.93
7.0.50.0200.06317.96
7.0.40.0030.04320.18
7.0.30.0170.05720.30
7.0.20.0370.06020.24
7.0.10.0100.06320.02
7.0.00.0070.06020.06
5.6.280.0030.05021.13
5.6.210.0200.07020.70
5.6.200.0100.06318.18
5.6.190.0070.09320.55
5.6.180.0530.07020.61
5.6.170.0270.08020.54
5.6.160.0070.07720.56
5.6.150.0170.07718.20
5.6.140.0100.03318.20
5.6.130.0100.06718.14
5.6.120.0100.07021.00
5.6.110.0070.09020.99
5.6.100.0100.06021.05
5.6.90.0170.07321.09
5.6.80.0200.07020.27
5.5.350.0230.07720.42
5.5.340.0130.03318.03
5.5.330.0100.05020.47
5.5.320.0130.08320.31
5.5.310.0200.06720.37
5.5.300.0030.05717.95
5.5.290.0070.06017.92
5.5.280.0000.08320.88
5.5.270.0070.05720.84
5.5.260.0100.04020.96
5.5.250.0170.07020.66
5.5.240.0130.03320.26

preferences:
64.57 ms | 400 KiB | 5 Q