3v4l.org

run code in 300+ PHP versions simultaneously
<?php class E1 extends Exception {} function g() { static $i; for ($i = 0; $i < 5; ++$i) { if ($i === 3) { throw new E1; } yield "foo $i\n"; } yield 'bar'; // You will never get this. } $g = g(); for ($i = 0; $i < 5; ++$i) { try { $g->next(); } catch (Exception $e) { } $output = $g->current(); echo "$output\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.5.30.0100.00719.50
8.5.20.0140.00619.26
8.5.10.0120.00719.62
8.5.00.0130.01020.27
8.4.180.0130.01222.26
8.4.170.0140.00825.71
8.4.160.0150.01020.61
8.4.150.0080.00516.89
8.4.140.0160.00517.63
8.4.130.0080.00918.02
8.4.120.0030.00620.76
8.4.110.0090.01218.90
8.4.100.0130.00817.68
8.4.90.0090.01218.80
8.4.80.0070.00319.81
8.4.70.0130.00618.02
8.4.60.0080.01220.44
8.4.50.0150.00619.77
8.4.40.0000.00820.43
8.4.30.0000.00819.52
8.4.20.0180.00318.43
8.4.10.0070.00419.62
8.3.300.0150.00820.92
8.3.290.0070.01420.94
8.3.280.0130.00818.57
8.3.270.0120.00716.62
8.3.260.0040.00416.75
8.3.250.0120.00619.06
8.3.240.0020.00916.49
8.3.230.0110.00716.64
8.3.220.0050.00417.43
8.3.210.0020.00616.64
8.3.200.0080.00116.75
8.3.190.0090.00917.19
8.3.180.0110.01018.51
8.3.170.0000.01920.57
8.3.160.0110.00817.32
8.3.150.0150.00417.17
8.3.140.0100.00720.44
8.3.130.0040.00418.69
8.3.120.0060.00320.64
8.3.110.0060.00320.94
8.3.100.0000.00816.67
8.3.90.0000.00826.77
8.3.80.0030.00618.55
8.3.70.0040.01118.64
8.3.60.0110.00418.56
8.3.50.0050.01322.11
8.3.40.0150.00418.79
8.3.30.0070.00718.96
8.3.20.0040.00420.16
8.3.10.0080.00020.54
8.3.00.0080.00023.48
8.2.300.0120.01022.33
8.2.290.0130.00620.41
8.2.280.0060.00318.41
8.2.270.0060.00920.28
8.2.260.0140.00416.74
8.2.250.0040.00416.75
8.2.240.0040.00417.46
8.2.230.0030.00622.58
8.2.220.0050.00524.06
8.2.210.0080.00026.77
8.2.200.0060.00616.75
8.2.190.0100.00316.79
8.2.180.0110.00418.53
8.2.170.0110.00422.96
8.2.160.0070.01020.52
8.2.150.0050.00324.18
8.2.140.0030.00524.66
8.2.130.0040.00420.53
8.2.120.0070.00026.35
8.2.110.0100.00021.12
8.2.100.0040.00818.16
8.2.90.0000.00819.08
8.2.80.0040.00417.97
8.2.70.0040.00417.63
8.2.60.0080.00018.03
8.2.50.0040.00418.10
8.2.40.0080.00020.59
8.2.30.0040.00419.33
8.2.20.0070.00018.26
8.2.10.0040.00418.11
8.2.00.0040.00418.25
8.1.340.0100.00917.80
8.1.330.0100.00821.88
8.1.320.0120.00716.31
8.1.310.0150.00315.96
8.1.300.0070.01120.22
8.1.290.0040.00430.84
8.1.280.0130.00725.92
8.1.270.0030.00520.71
8.1.260.0070.00026.35
8.1.250.0000.00728.09
8.1.240.0060.00321.43
8.1.230.0060.00617.82
8.1.220.0000.00917.76
8.1.210.0080.00018.77
8.1.200.0030.00617.23
8.1.190.0030.00717.11
8.1.180.0050.00318.10
8.1.170.0030.00520.37
8.1.160.0040.00418.94
8.1.150.0000.00818.68
8.1.140.0070.00019.43
8.1.130.0000.00720.71
8.1.120.0070.00017.47
8.1.110.0030.00617.47
8.1.100.0040.00817.50
8.1.90.0070.00017.40
8.1.80.0070.00017.39
8.1.70.0040.00417.37
8.1.60.0030.00617.55
8.1.50.0030.00617.48
8.1.40.0000.00817.41
8.1.30.0060.00317.57
8.1.20.0040.00417.61
8.1.10.0000.00717.61
8.1.00.0060.00317.38
8.0.300.0040.00418.77
8.0.290.0080.00016.75
8.0.280.0030.00318.36
8.0.270.0000.00717.25
8.0.260.0040.00417.28
8.0.250.0070.00017.03
8.0.240.0040.00416.92
8.0.230.0040.00416.98
8.0.220.0040.00416.97
8.0.210.0000.00716.85
8.0.200.0040.00417.04
8.0.190.0000.00817.02
8.0.180.0050.00316.89
8.0.170.0000.00716.96
8.0.160.0000.00716.86
8.0.150.0070.00016.79
8.0.140.0000.00716.88
8.0.130.0000.00613.43
8.0.120.0050.00316.98
8.0.110.0000.00716.87
8.0.100.0070.00017.07
8.0.90.0040.00416.77
8.0.80.0040.01116.96
8.0.70.0000.00716.81
8.0.60.0040.00417.01
8.0.50.0040.00416.98
8.0.30.0120.00617.06
8.0.20.0090.01017.40
8.0.10.0000.00717.05
8.0.00.0150.00916.93
7.4.330.0030.00315.55
7.4.320.0000.00616.52
7.4.300.0000.00716.61
7.4.290.0060.00016.62
7.4.280.0060.00316.60
7.4.270.0000.00716.65
7.4.260.0000.00716.51
7.4.250.0040.00416.47
7.4.240.0000.00816.52
7.4.230.0030.00316.63
7.4.220.0100.01016.64
7.4.210.0030.01016.44
7.4.200.0040.00416.68
7.4.160.0140.00716.50
7.4.150.0080.00817.40
7.4.140.0100.00917.86
7.4.130.0080.01016.50
7.4.120.0100.01416.51
7.4.110.0090.00916.34
7.4.100.0090.00916.55
7.4.90.0090.00816.32
7.4.80.0070.01119.39
7.4.70.0090.00916.41
7.4.60.0070.01016.55
7.4.50.0070.00716.62
7.4.40.0090.00616.50
7.4.30.0060.01116.62
7.4.00.0070.01114.95
7.3.330.0000.00513.26
7.3.320.0000.00613.25
7.3.310.0050.00216.52
7.3.300.0030.00316.48
7.3.290.0050.00916.41
7.3.280.0120.00716.43
7.3.270.0150.00917.40
7.3.260.0130.00416.57
7.3.250.0060.01216.41
7.3.240.0080.01016.37
7.3.230.0150.00316.42
7.3.210.0030.01516.54
7.3.200.0090.01316.38
7.3.190.0090.00916.37
7.3.180.0090.01216.42
7.3.170.0030.01316.55
7.3.160.0030.01316.48
7.2.330.0120.00616.88
7.2.320.0080.01516.78
7.2.310.0070.01116.57
7.2.300.0100.01016.70
7.2.290.0070.01416.54
7.2.60.0110.00616.75
7.1.200.0070.00715.95
7.1.70.0000.00717.24
7.1.60.0100.00017.22
7.1.20.1570.06736.44
7.1.10.1170.09320.34
7.1.00.1030.06020.55
7.0.200.0090.00616.61
7.0.160.1130.05320.09
7.0.150.0970.05320.06
7.0.140.1100.06320.00
7.0.130.1100.06720.02
7.0.120.0870.05720.08
7.0.110.1300.06320.01
7.0.100.1330.05720.05
7.0.90.1230.06320.11
7.0.80.1770.08020.04
7.0.70.1100.06320.01
7.0.60.1730.06719.96
7.0.50.1670.07720.02
7.0.40.2400.07720.09
7.0.30.2030.06319.91
7.0.20.2100.06720.04
7.0.10.1330.05719.98
7.0.00.1370.07320.05

preferences:
107.71 ms | 1421 KiB | 5 Q