3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Source: https://wiki.php.net/rfc/generators function gen() { echo "Foo\n"; try { yield; } catch (Exception $e) { echo "Exception: {$e->getMessage()}\n"; } echo "Bar\n"; } $gen = gen(); $gen->rewind(); // echos "Foo" $gen->throw(new Exception('Test')); // echos "Exception: Test" // and "Bar"

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.0130.00716.88
8.3.50.0210.00217.23
8.3.40.0110.00418.84
8.3.30.0070.00718.75
8.3.20.0040.00418.64
8.3.10.0030.00520.52
8.3.00.0070.00417.24
8.2.180.0070.01016.63
8.2.170.0100.01022.96
8.2.160.0100.00721.20
8.2.150.0080.00024.18
8.2.140.0000.00724.66
8.2.130.0070.00026.16
8.2.120.0050.00319.48
8.2.110.0030.00621.11
8.2.100.0090.00317.91
8.2.90.0070.00320.80
8.2.80.0000.00817.93
8.2.70.0080.00017.63
8.2.60.0080.00017.80
8.2.50.0080.00318.07
8.2.40.0040.00418.28
8.2.30.0070.00018.05
8.2.20.0000.00717.62
8.2.10.0070.00017.85
8.2.00.0040.00417.64
8.1.280.0070.01425.92
8.1.270.0000.00824.66
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0060.00322.42
8.1.230.0140.00021.04
8.1.220.0030.00517.74
8.1.210.0030.00518.94
8.1.200.0060.00317.35
8.1.190.0080.00017.40
8.1.180.0030.00618.10
8.1.170.0090.00018.94
8.1.160.0070.00018.94
8.1.150.0040.00418.63
8.1.140.0040.00417.34
8.1.130.0030.00317.82
8.1.120.0000.00917.48
8.1.110.0040.00417.46
8.1.100.0070.00017.50
8.1.90.0000.00817.32
8.1.80.0020.00517.46
8.1.70.0000.00717.32
8.1.60.0000.00717.64
8.1.50.0000.00717.47
8.1.40.0030.00617.33
8.1.30.0070.00017.65
8.1.20.0000.00817.50
8.1.10.0070.00017.46
8.1.00.0040.00417.38
8.0.300.0030.00519.98
8.0.290.0040.00416.75
8.0.280.0030.00318.34
8.0.270.0000.00717.16
8.0.260.0030.00316.91
8.0.250.0040.00416.89
8.0.240.0000.00816.91
8.0.230.0030.00316.90
8.0.220.0020.00516.92
8.0.210.0030.00516.93
8.0.200.0030.00316.96
8.0.190.0040.00417.02
8.0.180.0040.00416.96
8.0.170.0060.00316.91
8.0.160.0050.00216.97
8.0.150.0000.00816.92
8.0.140.0040.00716.86
8.0.130.0050.00013.29
8.0.120.0040.00416.80
8.0.110.0000.00716.93
8.0.100.0000.00716.83
8.0.90.0040.00416.72
8.0.80.0090.00616.87
8.0.70.0030.00516.79
8.0.60.0030.00517.05
8.0.50.0000.00716.96
8.0.30.0100.01017.06
8.0.20.0140.00717.19
8.0.10.0030.00316.97
8.0.00.0090.00816.82
7.4.330.0030.00312.97
7.4.320.0000.00716.45
7.4.300.0000.00716.48
7.4.290.0030.00316.64
7.4.280.0050.00316.58
7.4.270.0040.00416.64
7.4.260.0060.00013.25
7.4.250.0080.00016.57
7.4.240.0040.00316.51
7.4.230.0000.00716.63
7.4.220.0090.00916.63
7.4.210.0110.00716.55
7.4.200.0060.00316.67
7.4.190.0040.00416.76
7.4.160.0130.00316.73
7.4.150.0090.00916.52
7.4.140.0100.00716.55
7.4.130.0100.00916.62
7.4.120.0070.01016.64
7.4.110.0180.01216.60
7.4.100.0030.01316.54
7.4.90.0090.00916.43
7.4.80.0040.01719.39
7.4.70.0080.01216.64
7.4.60.0090.00916.38
7.4.50.0030.00616.36
7.4.40.0030.00916.60
7.4.30.0090.01216.41
7.4.00.0100.00714.82
7.3.330.0030.00313.22
7.3.320.0000.00513.15
7.3.310.0040.00416.24
7.3.300.0080.00016.25
7.3.290.0160.00016.29
7.3.280.0120.00416.28
7.3.270.0070.01016.22
7.3.260.0100.01116.48
7.3.250.0110.01116.40
7.3.240.0130.00316.38
7.3.230.0100.00716.33
7.3.210.0100.00716.30
7.3.200.0110.00716.52
7.3.190.0100.00616.29
7.3.180.0110.00516.59
7.3.170.0120.00416.51
7.3.160.0130.01016.36
7.3.120.0090.00914.94
7.3.110.0040.01214.70
7.3.100.0040.01114.77
7.3.90.0040.01414.57
7.3.80.0130.00714.86
7.3.70.0030.01214.77
7.3.60.0040.00814.71
7.3.50.0070.00714.84
7.3.40.0030.01314.65
7.3.30.0040.00814.83
7.3.20.0000.01416.76
7.3.10.0040.01116.69
7.3.00.0060.00316.40
7.2.330.0120.00916.50
7.2.320.0110.00816.84
7.2.310.0090.01216.86
7.2.300.0130.00816.77
7.2.290.0030.01616.58
7.2.250.0110.00715.13
7.2.240.0070.01015.10
7.2.230.0060.00914.79
7.2.220.0040.00714.61
7.2.210.0060.00914.69
7.2.200.0030.01015.10
7.2.190.0050.00815.04
7.2.180.0060.01015.04
7.2.170.0030.00715.05
7.2.00.0040.01519.38
7.1.330.0100.00715.79
7.1.320.0070.00715.40
7.1.310.0100.00715.52
7.1.300.0090.00315.34
7.1.290.0030.01015.40
7.1.280.0120.00015.65
7.1.270.0070.00715.82
7.1.260.0050.00515.66
7.1.100.0040.00418.32
7.1.70.0040.00417.11
7.1.60.0120.01219.40
7.1.50.0120.00916.89
7.1.00.0000.06722.44
7.0.200.0070.00316.80
7.0.140.0070.07321.95
7.0.120.0070.06321.96
7.0.60.0030.07021.82
7.0.50.0130.05717.84
7.0.40.0070.05720.11
7.0.30.0270.08320.31
7.0.20.0200.04320.25
7.0.10.0100.03720.12
7.0.00.0070.05720.22
5.6.280.0030.07321.08
5.6.210.0130.03020.53
5.6.200.0070.03718.19
5.6.190.0000.05020.34
5.6.180.0070.04720.63
5.6.170.0300.07020.58
5.6.160.0030.04320.53
5.6.150.0030.04018.15
5.6.140.0030.05018.23
5.6.130.0030.04018.26
5.6.120.0070.08321.00
5.6.110.0200.07021.02
5.6.100.0030.08721.11
5.6.90.0200.03721.00
5.6.80.0070.08020.49
5.5.350.0000.07020.50
5.5.340.0030.04318.07
5.5.330.0030.04020.19
5.5.320.0200.04720.27
5.5.310.0200.04320.29
5.5.300.0000.05017.95
5.5.290.0100.04317.95
5.5.280.0070.08720.88
5.5.270.0170.08020.77
5.5.260.0000.07720.76
5.5.250.0100.08320.50
5.5.240.0200.05020.26
5.4.450.0070.04719.53
5.4.440.0130.03019.21
5.4.430.0030.08319.40
5.4.420.0130.07719.55
5.4.410.0170.07019.07
5.4.400.0070.07719.16
5.4.390.0070.08019.24
5.4.380.0100.06019.14
5.4.370.0000.08719.16
5.4.360.0070.06018.84
5.4.350.0000.05018.98
5.4.340.0030.06718.86
5.4.320.0170.05719.24
5.4.310.0130.06719.22
5.4.300.0070.04718.85
5.4.290.0070.05719.14
5.4.280.0030.06319.14
5.4.270.0070.07319.24
5.4.260.0030.07319.24
5.4.250.0230.05719.07
5.4.240.0100.06719.14
5.4.230.0130.04318.97
5.4.220.0070.07319.11
5.4.210.0030.06019.19
5.4.200.0030.07319.23
5.4.190.0130.07718.86
5.4.180.0100.06719.27
5.4.170.0130.04718.84
5.4.160.0070.04719.13
5.4.150.0070.03719.03
5.4.140.0100.04316.46
5.4.130.0130.07016.41
5.4.120.0000.04716.35
5.4.110.0030.03716.27
5.4.100.0030.04316.35
5.4.90.0170.02316.43
5.4.80.0030.07016.37
5.4.70.0030.06016.42
5.4.60.0030.05716.45
5.4.50.0000.08016.44
5.4.40.0130.05316.28
5.4.30.0030.06016.64
5.4.20.0000.05016.40
5.4.10.0070.07716.50
5.4.00.0100.04015.79
5.3.290.0070.08714.66
5.3.280.0070.08014.63
5.3.270.0070.08014.76
5.3.260.0100.08014.60
5.3.250.0100.03714.63
5.3.240.0130.03014.60
5.3.230.0100.06714.48
5.3.220.0070.05314.58
5.3.210.0100.04314.57
5.3.200.0070.07314.60
5.3.190.0100.07314.57
5.3.180.0030.05314.60
5.3.170.0070.06314.57
5.3.160.0070.06314.61
5.3.150.0070.07714.48
5.3.140.0100.05314.57
5.3.130.0070.08014.61
5.3.120.0000.05014.54
5.3.110.0100.07314.57
5.3.100.0100.04314.10
5.3.90.0070.07014.03
5.3.80.0100.07014.05
5.3.70.0070.06314.07
5.3.60.0070.05714.00
5.3.50.0130.03013.97
5.3.40.0070.03313.98
5.3.30.0170.06313.79
5.3.20.0130.04013.73
5.3.10.0070.07013.66
5.3.00.0030.04313.61
5.2.170.0070.06011.21
5.2.160.0070.03711.23
5.2.150.0030.05011.31
5.2.140.0100.03011.14
5.2.130.0030.06011.14
5.2.120.0100.05311.16
5.2.110.0070.03711.13
5.2.100.0030.03011.25
5.2.90.0030.04011.25
5.2.80.0030.03011.06
5.2.70.0000.04711.12
5.2.60.0030.04711.07
5.2.50.0070.04710.98
5.2.40.0100.06011.00
5.2.30.0070.04011.11
5.2.20.0100.06011.00
5.2.10.0070.05011.02
5.2.00.0000.04310.60
5.1.60.0000.0609.96
5.1.50.0070.03710.01
5.1.40.0030.0539.96
5.1.30.0000.03010.35
5.1.20.0000.05010.35
5.1.10.0100.0539.97
5.1.00.0000.03310.08
5.0.50.0000.0378.56
5.0.40.0000.0478.47
5.0.30.0030.0508.23
5.0.20.0030.0438.24
5.0.10.0100.0338.09
5.0.00.0070.0608.13
4.4.90.0000.0378.09
4.4.80.0070.0338.09
4.4.70.0000.0378.09
4.4.60.0000.0208.09
4.4.50.0030.0278.09
4.4.40.0000.0308.09
4.4.30.0030.0138.09
4.4.20.0030.0178.09
4.4.10.0000.0178.09
4.4.00.0030.0538.09
4.3.110.0000.0278.09
4.3.100.0030.0178.09
4.3.90.0000.0338.09
4.3.80.0000.0308.09
4.3.70.0070.0308.09
4.3.60.0000.0378.09
4.3.50.0030.0178.09
4.3.40.0000.0508.09
4.3.30.0070.0238.09
4.3.20.0000.0378.09
4.3.10.0000.0238.09
4.3.00.0100.0238.09

preferences:
38.72 ms | 401 KiB | 5 Q