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 var_dump($g->current()); $g->next(); $g->throw(new Exception("Whoa there lassie")); var_dump($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.0090.00616.63
8.3.50.0110.00418.05
8.3.40.0110.00418.85
8.3.30.0070.00718.70
8.3.20.0040.00420.33
8.3.10.0070.00023.61
8.3.00.0040.00419.33
8.2.180.0090.00616.63
8.2.170.0120.00622.96
8.2.160.0000.01420.52
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00719.54
8.2.110.0030.00620.45
8.2.100.0050.00517.80
8.2.90.0040.00419.22
8.2.80.0090.00017.97
8.2.70.0040.00417.63
8.2.60.0060.00318.03
8.2.50.0080.00018.07
8.2.40.0040.00419.28
8.2.30.0040.00420.63
8.2.20.0000.01117.59
8.2.10.0040.00417.94
8.2.00.0050.00218.05
8.1.270.0030.00723.73
8.1.260.0000.00826.35
8.1.250.0070.00728.09
8.1.240.0060.00322.13
8.1.230.0100.00317.64
8.1.220.0040.00417.74
8.1.210.0090.00018.77
8.1.200.0060.00317.35
8.1.190.0090.00017.57
8.1.180.0060.00318.10
8.1.170.0030.00618.41
8.1.160.0000.00722.01
8.1.150.0040.00418.95
8.1.140.0080.00019.62
8.1.130.0030.00317.66
8.1.120.0040.00417.43
8.1.110.0050.00217.46
8.1.100.0100.00017.36
8.1.90.0000.00717.36
8.1.80.0000.00717.48
8.1.70.0070.00017.45
8.1.60.0030.00617.57
8.1.50.0030.00617.59
8.1.40.0080.00417.52
8.1.30.0080.00017.60
8.1.20.0070.00017.43
8.1.10.0040.00417.58
8.1.00.0060.00317.51
8.0.300.0040.00418.77
8.0.290.0050.00216.75
8.0.280.0070.00018.44
8.0.270.0030.00317.14
8.0.260.0030.00317.30
8.0.250.0030.00316.90
8.0.240.0030.00316.90
8.0.230.0080.00016.96
8.0.220.0040.00416.89
8.0.210.0000.00716.77
8.0.200.0030.00316.97
8.0.190.0070.00016.88
8.0.180.0000.00716.90
8.0.170.0000.00716.84
8.0.160.0000.00916.91
8.0.150.0040.00416.72
8.0.140.0040.00416.81
8.0.130.0030.00313.38
8.0.120.0040.00416.89
8.0.110.0050.00316.82
8.0.100.0040.00416.89
8.0.90.0040.00417.03
8.0.80.0040.01816.91
8.0.70.0040.00416.89
8.0.60.0070.00016.94
8.0.50.0000.00816.98
8.0.30.0150.00317.06
8.0.20.0110.00817.40
8.0.10.0040.00417.04
8.0.00.0050.01316.73
7.4.330.0020.00216.77
7.4.320.0000.00716.52
7.4.300.0060.00016.36
7.4.290.0050.00316.40
7.4.280.0060.00316.39
7.4.270.0040.00416.42
7.4.260.0030.00716.39
7.4.250.0070.00016.50
7.4.240.0000.00716.49
7.4.230.0030.00316.53
7.4.220.0150.00316.49
7.4.210.0110.00316.63
7.4.200.0000.00716.41
7.4.160.0060.00916.48
7.4.150.0100.01017.40
7.4.140.0080.01017.86
7.4.130.0090.00916.60
7.4.120.0110.00716.52
7.4.110.0130.00616.47
7.4.100.0060.01716.54
7.4.90.0140.00516.58
7.4.80.0030.01319.39
7.4.70.0070.01416.45
7.4.60.0120.00316.28
7.4.50.0030.01016.28
7.4.40.0090.00916.62
7.4.30.0040.01216.59
7.4.00.0100.00314.86
7.3.330.0030.00313.31
7.3.320.0030.00313.25
7.3.310.0030.00316.11
7.3.300.0040.00416.13
7.3.290.0030.01216.27
7.3.280.0100.00516.29
7.3.270.0130.00317.40
7.3.260.0240.01516.33
7.3.250.0100.00816.34
7.3.240.0090.00916.33
7.3.230.0090.00916.39
7.3.210.0110.00916.42
7.3.200.0130.00316.39
7.3.190.0040.01316.49
7.3.180.0070.01016.50
7.3.170.0050.01516.27
7.3.160.0110.01116.32
7.2.330.0040.01416.84
7.2.320.0100.00716.79
7.2.310.0100.00716.46
7.2.300.0090.00916.64
7.2.290.0090.00916.44
7.2.60.0030.01017.02
7.2.00.0000.01219.45
7.1.200.0040.00815.89
7.1.100.0060.00917.89
7.1.70.0090.00416.99
7.1.60.0100.01019.36
7.1.50.0040.01916.66
7.1.00.0000.08022.31
7.0.200.0090.00016.62
7.0.60.0270.08020.08
7.0.50.0070.08017.89
7.0.40.0030.04320.32
7.0.30.0200.06020.19
7.0.20.0530.06720.25
7.0.10.0100.07720.23
7.0.00.0000.05020.05
5.6.280.0000.05021.16
5.6.210.0030.08020.50
5.6.200.0100.08018.22
5.6.190.0100.08020.38
5.6.180.0600.06320.55
5.6.170.0300.08320.47
5.6.160.0070.07720.54
5.6.150.0130.07318.27
5.6.140.0000.04318.18
5.6.130.0130.06718.23
5.6.120.0070.05720.90
5.6.110.0130.05320.89
5.6.100.0070.08721.01
5.6.90.0070.04021.01
5.6.80.0100.08020.44
5.5.350.0030.08020.42
5.5.340.0070.04017.98
5.5.330.0070.07720.26
5.5.320.0070.07020.30
5.5.310.0270.07020.24
5.5.300.0030.05017.98
5.5.290.0100.08317.92
5.5.280.0070.06020.68
5.5.270.0100.08020.84
5.5.260.0030.07720.84
5.5.250.0130.05320.70
5.5.240.0070.07320.26

preferences:
47.84 ms | 400 KiB | 5 Q