3v4l.org

run code in 300+ PHP versions simultaneously
<?php class GenClass { function __construct() { echo "Making GenClass\n"; } function __destruct() { echo "Destroying GenClass\n"; } function genInner() { throw new Exception; yield 5; } } function genOuter() { $x = (new GenClass)->genInner(); // $x is now a generator containing the only reference to a GenClass try { yield from $x; } catch (Exception $ex) { echo "Caught Exception (outer)\n"; } } $o = genOuter(); try { $o->next(); } catch (Exception $ex) { echo "Caught Exception (main)\n"; }

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.40.0140.00718.93
8.3.30.0110.00418.87
8.3.20.0000.00720.35
8.3.10.0070.00021.73
8.3.00.0080.00019.79
8.2.170.0040.01122.96
8.2.160.0110.00420.28
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0100.00021.00
8.2.120.0080.00026.35
8.2.110.0030.00620.53
8.2.100.0060.00617.68
8.2.90.0050.00319.23
8.2.80.0090.00017.97
8.2.70.0080.00017.50
8.2.60.0000.00817.93
8.2.50.0030.00618.07
8.2.40.0000.00820.94
8.2.30.0030.00620.55
8.2.20.0040.00417.80
8.2.10.0040.00417.93
8.2.00.0040.00418.08
8.1.270.0080.00023.99
8.1.260.0030.00628.09
8.1.250.0040.00428.09
8.1.240.0040.00422.24
8.1.230.0070.00417.77
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0060.00317.35
8.1.190.0030.00517.23
8.1.180.0060.00318.10
8.1.170.0030.00618.46
8.1.160.0000.00820.70
8.1.150.0030.00318.79
8.1.140.0030.00519.61
8.1.130.0000.00717.68
8.1.120.0000.00817.42
8.1.110.0000.00717.45
8.1.100.0040.00417.44
8.1.90.0040.00417.48
8.1.80.0000.00717.34
8.1.70.0000.00717.33
8.1.60.0040.00417.58
8.1.50.0050.00317.54
8.1.40.0000.00917.51
8.1.30.0030.00617.57
8.1.20.0020.00517.68
8.1.10.0040.00417.54
8.1.00.0030.00617.40
8.0.300.0040.00418.77
8.0.290.0020.00516.75
8.0.280.0070.00018.32
8.0.270.0070.00017.26
8.0.260.0000.00618.49
8.0.250.0030.00317.04
8.0.240.0060.00017.04
8.0.230.0030.00416.91
8.0.220.0030.00317.01
8.0.210.0040.00416.93
8.0.200.0030.00417.02
8.0.190.0040.00417.02
8.0.180.0080.00016.91
8.0.170.0040.00416.90
8.0.160.0040.00416.84
8.0.150.0030.00316.89
8.0.140.0060.00316.80
8.0.130.0030.00313.34
8.0.120.0030.00517.00
8.0.110.0070.00016.89
8.0.100.0040.00416.85
8.0.90.0000.00817.02
8.0.80.0090.01216.99
8.0.70.0040.00417.00
8.0.60.0000.00716.94
8.0.50.0040.00416.83
8.0.30.0060.01217.08
8.0.20.0140.00617.40
8.0.10.0000.00717.13
8.0.00.0070.01116.85
7.4.330.0050.00016.79
7.4.320.0030.00316.54
7.4.300.0020.00516.59
7.4.290.0000.00716.51
7.4.280.0060.00616.53
7.4.270.0070.00016.43
7.4.260.0030.00316.60
7.4.250.0000.00716.37
7.4.240.0000.00716.55
7.4.230.0000.00716.58
7.4.220.0070.01416.67
7.4.210.0090.01016.71
7.4.200.0030.00316.41
7.4.160.0060.00916.43
7.4.150.0040.01417.40
7.4.140.0100.00817.86
7.4.130.0140.00316.45
7.4.120.0100.00716.57
7.4.110.0070.01116.62
7.4.100.0100.01116.76
7.4.90.0070.01016.66
7.4.80.0120.00619.39
7.4.70.0160.00616.58
7.4.60.0070.01016.63
7.4.50.0070.00716.45
7.4.40.0030.01216.44
7.4.30.0090.01316.55
7.4.00.0100.00314.66
7.3.330.0060.00013.18
7.3.320.0050.00213.22
7.3.310.0000.00716.25
7.3.300.0050.00316.32
7.3.290.0070.00916.37
7.3.280.0060.00916.35
7.3.270.0040.01317.40
7.3.260.0130.00316.36
7.3.250.0100.00816.34
7.3.240.0100.01016.51
7.3.230.0060.01116.55
7.3.210.0100.00716.45
7.3.200.0070.01116.26
7.3.190.0080.01616.41
7.3.180.0090.00616.54
7.3.170.0120.01016.41
7.3.160.0100.00616.51
7.2.330.0070.01016.67
7.2.320.0070.01116.50
7.2.310.0140.00416.70
7.2.300.0040.01316.72
7.2.290.0090.01416.65
7.2.60.0030.01316.71
7.2.00.0060.00319.13
7.1.200.0000.01215.57
7.1.100.0100.00318.14
7.1.70.0030.00617.04
7.1.60.0070.01819.05
7.1.50.0040.01916.89
7.1.00.0070.07022.43
7.0.200.0000.00716.82
7.0.60.0100.08019.79
7.0.50.0100.07717.91
7.0.40.0070.06320.09
7.0.30.0230.07720.09
7.0.20.0370.07320.07
7.0.10.0130.08020.26
7.0.00.0000.08720.10
5.6.280.0000.03320.90
5.6.210.0000.07720.70
5.6.200.0030.08718.21
5.6.190.0130.08020.55
5.6.180.3330.04320.46
5.6.170.0330.07320.71
5.6.160.0100.06020.54
5.6.150.0070.08018.11
5.6.140.0030.08318.29
5.6.130.0070.08318.28
5.6.120.0130.05021.14
5.6.110.0030.04021.02
5.6.100.0000.09320.98
5.6.90.0100.06020.97
5.6.80.0030.06020.40
5.5.350.0200.07320.44
5.5.340.0170.05317.93
5.5.330.0070.04720.46
5.5.320.0300.05020.38
5.5.310.0170.06320.41
5.5.300.0070.08018.09
5.5.290.0130.07017.95
5.5.280.0100.03320.88
5.5.270.0070.04320.64
5.5.260.0070.08320.89
5.5.250.0030.04020.64
5.5.240.0130.03720.27

preferences:
45.26 ms | 400 KiB | 5 Q