3v4l.org

run code in 300+ PHP versions simultaneously
<?php function gen() { yield 0; yield ['a','b','c'][1]; yield 2; yield 3; } try { $o = gen(); foreach($o as $g) { echo $g,' ',empty( boolval($g) )? 'false':'true',"\n"; } } catch (Exception $e) { echo "caught exception"; } finally { echo "Whatever, this line will always run\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.0130.00718.30
8.3.50.0130.00721.93
8.3.40.0090.00618.84
8.3.30.0100.00318.82
8.3.20.0040.00420.27
8.3.10.0040.00423.58
8.3.00.0040.00422.46
8.2.180.0090.00916.63
8.2.170.0070.00722.96
8.2.160.0100.00322.05
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0050.00226.16
8.2.120.0080.00017.75
8.2.110.0110.00722.12
8.2.100.0080.00318.03
8.2.90.0050.00319.23
8.2.80.0000.00818.03
8.2.70.0040.00417.63
8.2.60.0030.00618.04
8.2.50.0090.00018.07
8.2.40.0080.00018.22
8.2.30.0000.00818.11
8.2.20.0000.00717.73
8.2.10.0000.00817.68
8.2.00.0030.00617.77
8.1.280.0090.00625.92
8.1.270.0080.00023.87
8.1.260.0080.00026.35
8.1.250.0060.00328.09
8.1.240.0100.00023.67
8.1.230.0000.01019.18
8.1.220.0030.00517.74
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0000.00817.53
8.1.180.0030.00618.10
8.1.170.0060.00318.61
8.1.160.0050.00322.02
8.1.150.0000.00718.71
8.1.140.0070.00017.45
8.1.130.0030.00317.79
8.1.120.0080.00017.38
8.1.110.0040.00417.43
8.1.100.0070.00017.45
8.1.90.0050.00217.46
8.1.80.0030.00317.49
8.1.70.0000.00717.33
8.1.60.0050.00317.47
8.1.50.0080.00017.51
8.1.40.0000.00717.49
8.1.30.0000.00817.64
8.1.20.0060.00317.62
8.1.10.0040.00417.60
8.1.00.0070.00017.38
8.0.300.0000.00718.77
8.0.290.0000.00817.18
8.0.280.0030.00318.42
8.0.270.0030.00317.18
8.0.260.0000.00816.91
8.0.250.0030.00316.90
8.0.240.0000.00717.02
8.0.230.0030.00317.03
8.0.220.0040.00417.00
8.0.210.0040.00316.80
8.0.200.0070.00016.96
8.0.190.0050.00217.00
8.0.180.0030.00517.01
8.0.170.0040.00417.02
8.0.160.0070.00016.91
8.0.150.0000.00816.99
8.0.140.0070.00016.93
8.0.130.0050.00313.39
8.0.120.0050.00316.93
8.0.110.0000.00716.96
8.0.100.0040.00416.87
8.0.90.0000.00716.90
8.0.80.0040.01516.96
8.0.70.0050.00217.00
8.0.60.0050.00216.77
8.0.50.0070.00016.83
8.0.30.0100.01217.12
8.0.20.0120.01017.40
8.0.10.0000.00716.94
8.0.00.0050.01516.86
7.4.330.0000.00515.07
7.4.320.0070.00016.58
7.4.300.0000.00716.51
7.4.290.0000.00716.58
7.4.280.0070.00016.52
7.4.270.0000.00816.48
7.4.260.0030.00316.55
7.4.250.0000.00816.51
7.4.240.0050.00216.57
7.4.230.0040.00416.59
7.4.220.0120.00316.58
7.4.210.0110.00516.49
7.4.200.0050.00216.43
7.4.190.0030.00316.73
7.4.160.0030.01216.46
7.4.150.0090.00917.40
7.4.140.0100.00817.86
7.4.130.0120.00616.50
7.4.120.0100.01116.57
7.4.110.0100.01416.56
7.4.100.0090.01216.49
7.4.90.0110.00716.48
7.4.80.0140.00316.46
7.4.70.0090.00916.40
7.4.60.0070.01016.65
7.4.50.0040.00416.43
7.4.40.0070.01122.77
7.4.30.0070.01016.59
7.4.00.0070.01014.90
7.3.330.0050.00013.44
7.3.320.0030.00313.23
7.3.310.0070.00016.32
7.3.300.0000.00716.31
7.3.290.0040.01216.39
7.3.280.0090.00816.37
7.3.270.0150.00317.40
7.3.260.0120.01216.46
7.3.250.0110.00716.38
7.3.240.0130.00316.35
7.3.230.0030.01316.59
7.3.210.0080.00816.43
7.3.200.0040.01319.39
7.3.190.0130.01016.49
7.3.180.0100.00716.40
7.3.170.0070.01016.64
7.3.160.0170.00416.38
7.3.120.0070.01114.55
7.2.330.0030.01516.71
7.2.320.0100.00616.73
7.2.310.0170.00516.52
7.2.300.0140.00316.48
7.2.290.0100.00716.54
7.2.60.0040.01117.10
7.2.00.0060.00819.51
7.1.200.0000.00715.95
7.1.100.0070.00718.00
7.1.70.0030.01017.23
7.1.60.0170.00719.32
7.1.50.0060.01017.07
7.1.00.0030.07722.48
7.0.200.0000.00916.84
7.0.140.0030.07321.95
7.0.60.0130.05720.04
7.0.50.0070.06717.89
7.0.40.0070.05020.23
7.0.30.0330.04020.09
7.0.20.0270.07720.12
7.0.10.0270.07720.24
7.0.00.0070.08020.16
5.6.280.0030.07321.10
5.6.210.0070.08320.70
5.6.200.0130.08018.12
5.6.190.0100.08320.52
5.6.180.4030.04720.30
5.6.170.0170.08320.44
5.6.160.0030.08720.48
5.6.150.0070.08018.18
5.6.140.0030.05718.18
5.6.130.0070.06318.17
5.6.120.0000.05320.98
5.6.110.0070.07020.96
5.6.100.0070.08020.98
5.6.90.0070.03720.98
5.6.80.0100.07320.36
5.6.70.4130.03320.38
5.5.350.0230.06320.52
5.5.340.0070.06018.08
5.5.330.0200.07020.27
5.5.320.0230.04320.41
5.5.310.0300.04720.34
5.5.300.0100.05018.09
5.5.290.0100.06717.98
5.5.280.0070.04020.77
5.5.270.0200.07020.79
5.5.260.0030.04320.65
5.5.250.0130.07020.59
5.5.240.0000.04320.19
5.4.450.0030.07319.32
5.4.440.0130.05019.49
5.4.430.0030.05719.27
5.4.420.0000.05019.41
5.4.410.0100.06319.42
5.4.400.0030.07319.07
5.4.390.0030.05019.14
5.4.380.0030.07319.24
5.4.370.0070.04319.09
5.4.360.0230.05019.15
5.4.350.0000.07719.20
5.4.340.0030.06319.31
5.4.320.0100.07019.07
5.4.310.0030.05719.00
5.4.300.0000.05019.22
5.4.290.0100.04719.23
5.4.280.0070.07018.97
5.4.270.0030.04318.85
5.4.260.0070.05719.15
5.4.250.0100.04719.13
5.4.240.0030.07719.09
5.4.230.0070.06319.24
5.4.220.0100.07019.24
5.4.210.0000.06018.99
5.4.200.0100.07319.15
5.4.190.0000.08319.12
5.4.180.0030.04719.23
5.4.170.0030.06718.96
5.4.160.0030.07019.11
5.4.150.0070.07019.05
5.4.140.0000.07716.50
5.4.130.0000.04716.30
5.4.120.0000.05016.51
5.4.110.0030.05316.28
5.4.100.0030.06716.19
5.4.90.0030.04716.26
5.4.80.0030.06016.36
5.4.70.0100.06316.54
5.4.60.0000.06016.43
5.4.50.0000.03716.51
5.4.40.0000.06716.52
5.4.30.0030.07716.53
5.4.20.0000.05016.42
5.4.10.0030.03716.42
5.4.00.0000.07715.95
5.3.290.0070.07314.67
5.3.280.0070.06314.60
5.3.270.0070.07714.51
5.3.260.0070.06314.79
5.3.250.0030.05714.60
5.3.240.0030.07714.62
5.3.230.0000.07714.58
5.3.220.0030.07014.57
5.3.210.0000.06714.65
5.3.200.0100.07014.47
5.3.190.0070.07714.57
5.3.180.0070.07014.49
5.3.170.0000.06314.58
5.3.160.0000.04714.61
5.3.150.0000.04714.45
5.3.140.0030.07714.48
5.3.130.0000.07714.55
5.3.120.0070.08014.57
5.3.110.0000.05314.71
5.3.100.0030.06014.05
5.3.90.0070.07314.13
5.3.80.0170.05014.17
5.3.70.0030.07314.23
5.3.60.0100.06314.22
5.3.50.0070.06713.86
5.3.40.0070.06713.92
5.3.30.0130.05713.97
5.3.20.0000.07013.74
5.3.10.0100.05013.57
5.3.00.0100.07013.71
5.2.170.0030.06712.44
5.2.160.0030.05312.44
5.2.150.0070.04712.44
5.2.140.0030.04012.44
5.2.130.0030.03312.44
5.2.120.0070.05712.44
5.2.110.0170.03712.44
5.2.100.0030.06012.44
5.2.90.0030.06012.44
5.2.80.0070.05312.44
5.2.70.0000.06312.44
5.2.60.0000.06012.44
5.2.50.0030.05712.44
5.2.40.0070.05712.44
5.2.30.0000.06312.44
5.2.20.0030.03312.44
5.2.10.0030.03312.44
5.2.00.0070.05312.44
5.1.60.0070.02312.44
5.1.50.0030.05012.44
5.1.40.0070.02712.44
5.1.30.0000.04312.44
5.1.20.0000.06012.44
5.1.10.0070.04012.44
5.1.00.0070.05012.44
5.0.50.0030.04012.44
5.0.40.0000.04712.44
5.0.30.0000.05312.44
5.0.20.0030.04312.44
5.0.10.0000.04712.44
5.0.00.0000.03312.44
4.4.90.0030.03312.44
4.4.80.0030.03312.44
4.4.70.0000.03312.44
4.4.60.0070.01712.44
4.4.50.0030.02012.44
4.4.40.0000.03312.44
4.4.30.0000.02312.44
4.4.20.0030.03312.44
4.4.10.0000.03012.44
4.4.00.0030.05312.44
4.3.110.0030.03312.44
4.3.100.0030.03012.44
4.3.90.0030.01712.44
4.3.80.0000.02712.44
4.3.70.0030.03312.44
4.3.60.0030.02012.44
4.3.50.0030.02012.44
4.3.40.0100.03312.44
4.3.30.0000.03712.44
4.3.20.0070.02312.44
4.3.10.0030.03712.44
4.3.00.0030.02312.44

preferences:
38.63 ms | 401 KiB | 5 Q