3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('error_reporting', -1); ini_set('display_errors', 'on'); function generator() { $a = ['a', 'b', 'c']; if(empty($a)){ return null; } foreach($a as $i){ yield $i; } } foreach(generator() as $i) { echo $i; }

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.0170.00316.63
8.3.50.0140.00016.47
8.3.40.0070.00718.50
8.3.30.0000.01418.59
8.3.20.0100.00020.73
8.3.10.0040.01121.68
8.3.00.0050.00319.41
8.2.180.0090.01216.50
8.2.170.0110.00422.96
8.2.160.0030.01020.27
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0060.00320.35
8.2.120.0040.00426.35
8.2.110.0100.00022.31
8.2.100.0080.00317.78
8.2.90.0080.00017.75
8.2.80.0080.00018.84
8.2.70.0090.00017.63
8.2.60.0080.00017.36
8.2.50.0000.00817.55
8.2.40.0030.00717.75
8.2.30.0040.00419.12
8.2.20.0030.00918.18
8.2.10.0050.00218.05
8.2.00.0000.00718.17
8.1.280.0030.01025.92
8.1.270.0000.00723.97
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0040.00423.69
8.1.230.0080.00319.15
8.1.220.0000.00917.79
8.1.210.0060.00318.77
8.1.200.0040.00417.35
8.1.190.0000.00917.13
8.1.180.0080.00018.10
8.1.170.0000.00817.62
8.1.160.0030.00318.95
8.1.150.0000.00820.55
8.1.140.0100.00019.61
8.1.130.0000.00718.77
8.1.120.0080.00017.50
8.1.110.0030.00517.45
8.1.100.0030.00517.45
8.1.90.0060.00317.48
8.1.80.0070.00017.35
8.1.70.0000.00717.46
8.1.60.0080.00017.59
8.1.50.0040.00417.42
8.1.40.0000.00817.51
8.1.30.0070.00017.59
8.1.20.0040.00417.63
8.1.10.0040.00417.41
8.1.00.0030.00617.35
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0070.00018.45
8.0.270.0040.00417.12
8.0.260.0030.00316.73
8.0.250.0030.00316.89
8.0.240.0040.00416.98
8.0.230.0070.00016.95
8.0.220.0070.00016.86
8.0.210.0030.00316.94
8.0.200.0000.00716.83
8.0.190.0080.00016.98
8.0.180.0040.00416.80
8.0.170.0000.00716.93
8.0.160.0000.00816.86
8.0.150.0020.00516.72
8.0.140.0030.00616.71
8.0.130.0030.00313.36
8.0.120.0050.00316.85
8.0.110.0040.00416.82
8.0.100.0000.00716.94
8.0.90.0030.00316.91
8.0.80.0130.00916.81
8.0.70.0000.00816.77
8.0.60.0050.00216.85
8.0.50.0040.00316.94
8.0.30.0120.00916.99
8.0.20.0100.00917.40
8.0.10.0040.00417.05
8.0.00.0090.01216.94
7.4.330.0020.00215.55
7.4.320.0000.00616.55
7.4.300.0030.00316.46
7.4.290.0030.00316.54
7.4.280.0000.00716.38
7.4.270.0040.00416.55
7.4.260.0030.00313.28
7.4.250.0030.00316.41
7.4.240.0030.00316.43
7.4.230.0070.00016.54
7.4.220.0130.00616.61
7.4.210.0070.01816.46
7.4.200.0030.00316.29
7.4.160.0130.00816.28
7.4.150.0100.00717.40
7.4.140.0090.01117.86
7.4.130.0160.00316.53
7.4.120.0060.01516.58
7.4.110.0080.01016.26
7.4.100.0050.01316.40
7.4.90.0140.00916.56
7.4.80.0090.00919.39
7.4.70.0100.00716.59
7.4.60.0090.00616.48
7.4.50.0040.01116.44
7.4.40.0090.00616.51
7.4.30.0130.00316.63
7.4.00.0070.00714.78
7.3.330.0060.00313.44
7.3.320.0000.00513.20
7.3.310.0040.00416.27
7.3.300.0000.00716.25
7.3.290.0110.00416.36
7.3.280.0090.00816.34
7.3.270.0130.00317.40
7.3.260.0080.01016.64
7.3.250.0110.00716.55
7.3.240.0090.00816.45
7.3.230.0000.01716.46
7.3.210.0090.00816.66
7.3.200.0080.00816.68
7.3.190.0070.01016.61
7.3.180.0090.00916.66
7.3.170.0130.00816.64
7.3.160.0060.00916.41
7.2.330.0150.00316.59
7.2.320.0100.01316.69
7.2.310.0060.01016.65
7.2.300.0040.01316.73
7.2.290.0110.00616.51
7.2.60.0070.00716.69
7.2.00.0030.01019.48
7.1.200.0000.01415.82
7.1.100.0030.00818.30
7.1.70.0000.00817.33
7.1.60.0070.00317.41
7.1.50.0060.00616.90
7.1.40.0040.00816.64
7.1.30.0140.00016.68
7.1.20.0060.00616.63
7.1.10.0040.00416.48
7.1.00.0070.01016.84
7.0.200.0060.00916.96
7.0.190.0000.01116.63
7.0.180.0080.00316.32
7.0.170.0000.00716.40
7.0.160.0030.00616.39
7.0.150.0050.00316.27
7.0.140.0000.01016.53
7.0.130.0060.00916.37
7.0.120.0040.00816.52
7.0.110.0070.01016.47
7.0.100.0030.01016.29
7.0.90.0040.00816.31
7.0.80.0050.00316.34
7.0.70.0000.01116.41
7.0.60.0050.00316.11
7.0.50.0000.00816.25
7.0.40.0040.01115.49
7.0.30.0040.00415.49
7.0.20.0040.00415.49
7.0.10.0120.00315.49
7.0.00.0040.00415.49

preferences:
43.97 ms | 400 KiB | 5 Q