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.60.0100.00716.88
8.3.50.0110.00821.95
8.3.40.0150.00618.79
8.3.30.0210.00018.90
8.3.20.0080.00020.36
8.3.10.0070.00021.87
8.3.00.0030.00519.79
8.2.180.0100.00716.63
8.2.170.0140.00422.96
8.2.160.0030.01020.38
8.2.150.0100.00324.18
8.2.140.0090.00024.66
8.2.130.0080.00019.24
8.2.120.0030.00626.35
8.2.110.0060.00322.29
8.2.100.0130.00317.79
8.2.90.0040.00419.23
8.2.80.0050.00317.97
8.2.70.0030.00617.38
8.2.60.0000.00817.91
8.2.50.0040.00418.07
8.2.40.0040.00422.32
8.2.30.0030.00520.61
8.2.20.0030.00617.64
8.2.10.0070.00017.93
8.2.00.0000.00718.08
8.1.280.0070.00725.92
8.1.270.0130.00620.22
8.1.260.0140.00028.09
8.1.250.0070.00028.09
8.1.240.0170.00323.90
8.1.230.0040.00717.76
8.1.220.0050.00317.74
8.1.210.0060.00318.77
8.1.200.0030.00617.35
8.1.190.0060.00317.23
8.1.180.0030.00518.10
8.1.170.0040.00418.36
8.1.160.0040.00420.76
8.1.150.0050.00318.89
8.1.140.0000.00919.61
8.1.130.0030.00317.74
8.1.120.0000.00817.30
8.1.110.0040.00417.50
8.1.100.0040.00417.51
8.1.90.0040.00417.34
8.1.80.0030.00317.33
8.1.70.0030.00317.39
8.1.60.0080.00017.51
8.1.50.0080.00017.52
8.1.40.0000.00817.50
8.1.30.0030.00617.73
8.1.20.0050.00317.57
8.1.10.0040.00417.50
8.1.00.0000.00717.39
8.0.300.0000.00718.77
8.0.290.0080.00016.63
8.0.280.0000.00718.45
8.0.270.0040.00417.27
8.0.260.0000.00617.23
8.0.250.0060.00017.04
8.0.240.0030.00316.90
8.0.230.0040.00417.02
8.0.220.0050.00216.92
8.0.210.0000.00716.94
8.0.200.0000.00616.98
8.0.190.0050.00216.91
8.0.180.0070.00016.93
8.0.170.0100.00016.96
8.0.160.0040.00416.92
8.0.150.0000.00716.93
8.0.140.0030.00516.86
8.0.130.0030.00313.38
8.0.120.0030.00616.92
8.0.110.0030.00316.87
8.0.100.0070.00017.02
8.0.90.0040.00416.77
8.0.80.0090.00616.95
8.0.70.0030.00517.02
8.0.60.0080.00017.02
8.0.50.0050.00316.92
8.0.30.0090.00916.93
8.0.20.0050.01417.40
8.0.10.0030.00517.14
8.0.00.0100.00716.86
7.4.330.0000.00516.84
7.4.320.0030.00316.50
7.4.300.0000.00716.42
7.4.290.0040.00316.60
7.4.280.0030.00716.49
7.4.270.0080.00016.56
7.4.260.0070.00316.54
7.4.250.0000.00716.39
7.4.240.0020.00516.58
7.4.230.0030.00316.60
7.4.220.0130.01016.70
7.4.210.0060.01216.57
7.4.200.0040.00416.50
7.4.160.0190.00316.42
7.4.150.0120.00617.40
7.4.140.0100.01017.86
7.4.130.0030.01616.60
7.4.120.0070.01016.61
7.4.110.0030.01416.55
7.4.100.0110.00616.44
7.4.90.0160.00716.53
7.4.80.0130.00919.39
7.4.70.0130.00316.50
7.4.60.0080.00816.63
7.4.50.0060.00916.37
7.4.40.0060.01116.50
7.4.30.0130.00716.47
7.4.00.0050.01115.05
7.3.330.0020.00513.22
7.3.320.0000.00513.23
7.3.310.0080.00016.22
7.3.300.0070.00016.40
7.3.290.0000.00616.31
7.3.280.0080.01016.36
7.3.270.0100.01317.40
7.3.260.0140.01316.62
7.3.250.0110.01016.46
7.3.240.0080.00816.49
7.3.230.0150.00316.39
7.3.210.0060.01216.46
7.3.200.0120.00916.39
7.3.190.0080.00816.41
7.3.180.0060.00916.48
7.3.170.0090.01316.41
7.3.160.0110.00516.58
7.3.120.0050.01114.84
7.3.110.0070.00914.86
7.3.100.0100.00614.72
7.3.90.0100.00414.90
7.3.80.0040.01014.84
7.3.70.0030.00914.67
7.3.60.0060.01014.65
7.3.50.0040.00714.60
7.3.40.0070.00514.79
7.3.30.0090.00614.68
7.3.20.0060.00716.59
7.3.10.0060.00616.59
7.3.00.0070.00716.59
7.2.330.0100.00716.64
7.2.320.0120.00616.78
7.2.310.0070.01016.40
7.2.300.0100.01016.39
7.2.290.0100.00716.53
7.2.250.0070.00915.01
7.2.240.0090.01114.85
7.2.230.0040.01014.83
7.2.220.0060.01015.07
7.2.210.0070.00715.15
7.2.200.0040.00815.00
7.2.190.0090.00715.00
7.2.180.0020.00914.97
7.2.170.0060.00714.95
7.2.160.0110.00514.97
7.2.150.0040.00716.93
7.2.140.0070.00516.98
7.2.130.0070.00416.82
7.2.120.0070.00516.98
7.2.110.0050.00616.88
7.2.100.0050.00916.89
7.2.90.0050.00716.93
7.2.80.0050.00916.80
7.2.70.0040.00816.88
7.2.60.0060.00916.92
7.2.50.0030.00916.85
7.2.40.0010.01317.06
7.2.30.0090.00716.99
7.2.20.0080.00616.92
7.2.10.0050.00716.98
7.2.00.0070.00817.52
7.1.330.0100.00715.62
7.1.320.0060.00915.79
7.1.310.0040.00815.72
7.1.300.0020.00915.68
7.1.290.0100.00315.61
7.1.280.0060.00815.73
7.1.270.0060.00615.68
7.1.260.0020.00915.70
7.1.250.0050.00615.74
7.1.240.0060.00815.84
7.1.230.0050.00915.69
7.1.220.0040.01115.74
7.1.210.0100.00315.80
7.1.200.0020.00815.79
7.1.190.0090.00315.71
7.1.180.0080.00515.75
7.1.170.0090.00415.82
7.1.160.0010.01215.65
7.1.150.0060.00615.70
7.1.140.0050.01015.90
7.1.130.0050.00715.86
7.1.120.0060.00615.85
7.1.110.0060.00815.83
7.1.100.0070.00616.47
7.1.90.0050.00715.60
7.1.80.0040.00915.70
7.1.70.0040.00516.20
7.1.60.0070.01116.81
7.1.50.0050.01216.18
7.1.40.0050.00815.76
7.1.30.0040.00815.44
7.1.20.0080.00615.73
7.1.10.0090.00615.50
7.1.00.0060.03017.96
7.0.330.0030.00915.15
7.0.320.0000.01015.22
7.0.310.0030.01115.38
7.0.300.0060.00815.41
7.0.290.0080.00615.14
7.0.280.0060.00815.48
7.0.270.0040.00815.29
7.0.260.0040.01115.46
7.0.250.0030.01315.42
7.0.240.0040.00615.45
7.0.230.0030.00715.47
7.0.220.0070.00715.48
7.0.210.0090.00515.26
7.0.200.0230.00815.88
7.0.190.0060.00615.41
7.0.180.0090.00215.53
7.0.170.0090.00415.29
7.0.160.0050.00815.37
7.0.150.0080.00815.15
7.0.140.0040.00715.44
7.0.130.0070.00715.51
7.0.120.0070.00715.50
7.0.110.0030.01015.30
7.0.100.0030.01015.26
7.0.90.0050.00915.46
7.0.80.0070.00615.33
7.0.70.0040.00915.38
7.0.60.0090.02216.84
7.0.50.0030.02016.38
7.0.40.0070.01915.71
7.0.30.0100.02215.76
7.0.20.0130.03015.77
7.0.10.0040.02415.75
7.0.00.0050.01915.67
5.6.400.0030.00914.20
5.6.390.0020.01313.95
5.6.380.0030.00814.18
5.6.370.0090.00313.74
5.6.360.0060.00614.19
5.6.350.0030.00814.08
5.6.340.0080.00514.31
5.6.330.0080.00414.20
5.6.320.0100.00514.09
5.6.310.0010.01414.30
5.6.300.0050.00514.15
5.6.290.0060.00614.23
5.6.280.0020.01916.58
5.6.270.0050.01014.22
5.6.260.0050.00714.18
5.6.250.0060.00814.29
5.6.240.0030.01114.13
5.6.230.0080.00514.02
5.6.220.0070.00514.00
5.6.210.0110.02816.25
5.6.200.0070.03215.48
5.6.190.0060.02316.30
5.6.180.0090.03316.24
5.6.170.0110.02116.26
5.6.160.0060.02316.33
5.6.150.0110.02615.37
5.6.140.0080.02015.49
5.6.130.0030.02215.56
5.6.120.0040.03216.43
5.6.110.0050.02516.48
5.6.100.0050.02516.53
5.6.90.0090.03116.45
5.6.80.0030.02516.15
5.6.70.0080.00314.07
5.6.60.0050.00714.08
5.6.50.0070.01014.05
5.6.40.0040.00913.89
5.6.30.0090.00714.01
5.6.20.0080.00814.07
5.6.10.0070.00713.91
5.6.00.0030.01214.09
5.5.380.0030.00814.23
5.5.370.0070.00713.85
5.5.360.0020.01113.96
5.5.350.0100.02016.33
5.5.340.0090.02415.30
5.5.330.0080.03116.20
5.5.320.0110.02316.03
5.5.310.0110.03416.10
5.5.300.0070.03415.32
5.5.290.0080.01615.43
5.5.280.0090.01716.49
5.5.270.0060.03016.31
5.5.260.0030.02116.26
5.5.250.0090.03016.22
5.5.240.0130.02916.12
5.5.230.0060.00513.88
5.5.220.0040.00713.88
5.5.210.0040.00813.95
5.5.200.0080.00813.95
5.5.190.0070.01014.03
5.5.180.0050.01214.08
5.5.170.0030.00813.91
5.5.160.0050.00814.10
5.5.150.0030.01113.88
5.5.140.0070.00714.04
5.5.130.0090.00514.02
5.5.120.0070.00614.02
5.5.110.0030.00914.09
5.5.100.0070.00514.06
5.5.90.0010.01313.79
5.5.80.0080.00814.08
5.5.70.0080.00714.08
5.5.60.0080.00514.02
5.5.50.0050.01113.66
5.5.40.0050.01113.91
5.5.30.0050.00713.73
5.5.20.0050.00714.12
5.5.10.0090.00413.96
5.5.00.0040.00413.97

preferences:
43.16 ms | 401 KiB | 5 Q