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.0150.00416.75
8.3.50.0110.00416.37
8.3.40.0040.01118.77
8.3.30.0110.00418.63
8.3.20.0030.00719.03
8.3.10.0000.00721.76
8.3.00.0080.00019.47
8.2.180.0180.00416.73
8.2.170.0070.00722.96
8.2.160.0060.01020.35
8.2.150.0030.00525.66
8.2.140.0000.00824.66
8.2.130.0000.00720.39
8.2.120.0000.00726.35
8.2.110.0030.00620.95
8.2.100.0090.00318.03
8.2.90.0040.00419.27
8.2.80.0000.00818.03
8.2.70.0030.00617.63
8.2.60.0000.00817.80
8.2.50.0060.00318.10
8.2.40.0040.00422.14
8.2.30.0030.00621.04
8.2.20.0030.00918.05
8.2.10.0050.00217.99
8.2.00.0000.00717.98
8.1.280.0040.01125.92
8.1.270.0060.00323.96
8.1.260.0000.00826.35
8.1.250.0000.00728.09
8.1.240.0090.01219.14
8.1.230.0080.00419.29
8.1.220.0040.00417.79
8.1.210.0040.00418.77
8.1.200.0060.00317.36
8.1.190.0050.00317.23
8.1.180.0000.00718.10
8.1.170.0040.00418.48
8.1.160.0070.00019.00
8.1.150.0000.00720.55
8.1.140.0070.00419.55
8.1.130.0000.00818.88
8.1.120.0000.00717.39
8.1.110.0040.00417.43
8.1.100.0080.00017.39
8.1.90.0070.00317.36
8.1.80.0030.00317.44
8.1.70.0030.00317.34
8.1.60.0050.00317.56
8.1.50.0000.00717.43
8.1.40.0030.00517.48
8.1.30.0000.00717.51
8.1.20.0000.00717.55
8.1.10.0040.00417.43
8.1.00.0030.00617.50
8.0.300.0000.00818.78
8.0.290.0070.00016.75
8.0.280.0000.00718.43
8.0.270.0030.00316.88
8.0.260.0030.00316.88
8.0.250.0030.00317.02
8.0.240.0000.00717.04
8.0.230.0070.00016.94
8.0.220.0030.00316.89
8.0.210.0000.00816.84
8.0.200.0020.00516.93
8.0.190.0000.00816.91
8.0.180.0000.00716.93
8.0.170.0050.00216.94
8.0.160.0000.00716.94
8.0.150.0000.00716.80
8.0.140.0060.00316.79
8.0.130.0060.00013.34
8.0.120.0050.00316.80
8.0.110.0040.00416.89
8.0.100.0000.00817.03
8.0.90.0000.00716.91
8.0.80.0090.00916.92
8.0.70.0070.00016.82
8.0.60.0040.00416.83
8.0.50.0000.00816.90
8.0.30.0120.00817.01
8.0.20.0100.00917.40
8.0.10.0000.00816.96
8.0.00.0150.00616.73
7.4.330.0050.00015.55
7.4.320.0060.00016.62
7.4.300.0000.00716.43
7.4.290.0030.00316.57
7.4.280.0050.00316.49
7.4.270.0000.00716.57
7.4.260.0050.00013.26
7.4.250.0040.00416.44
7.4.240.0000.00716.64
7.4.230.0030.00316.43
7.4.220.0070.01416.61
7.4.210.0070.01016.62
7.4.200.0030.00316.62
7.4.160.0100.00616.54
7.4.150.0140.00917.40
7.4.140.0110.01217.86
7.4.130.0150.00316.61
7.4.120.0140.00716.49
7.4.110.0070.01016.54
7.4.100.0100.01316.48
7.4.90.0060.01216.57
7.4.80.0110.01119.39
7.4.70.0030.01716.50
7.4.60.0070.01016.55
7.4.50.0030.01416.63
7.4.40.0030.01316.51
7.4.30.0080.00816.54
7.4.00.0090.00715.08
7.3.330.0000.00713.38
7.3.320.0030.00213.37
7.3.310.0040.00416.27
7.3.300.0030.00316.32
7.3.290.0050.01016.38
7.3.280.0090.00716.34
7.3.270.0030.01617.40
7.3.260.0070.01016.46
7.3.250.0140.00816.53
7.3.240.0090.00816.40
7.3.230.0150.00316.51
7.3.210.0080.00916.48
7.3.200.0130.00316.40
7.3.190.0030.01216.49
7.3.180.0080.00816.56
7.3.170.0100.01016.44
7.3.160.0030.01316.43
7.3.120.0080.01014.93
7.3.110.0070.01014.92
7.3.100.0080.00614.93
7.3.90.0060.00914.75
7.3.80.0050.00714.80
7.3.70.0090.00814.91
7.3.60.0060.01014.83
7.3.50.0060.00814.63
7.3.40.0060.00814.80
7.3.30.0030.01114.97
7.3.20.0060.00616.71
7.3.10.0080.00516.51
7.3.00.0020.01216.76
7.2.330.0070.01016.68
7.2.320.0090.00916.53
7.2.310.0090.00916.42
7.2.300.0130.00316.86
7.2.290.0090.00916.34
7.2.250.0040.01415.02
7.2.240.0080.01115.17
7.2.230.0090.00515.09
7.2.220.0020.01215.23
7.2.210.0090.00615.03
7.2.200.0050.01314.98
7.2.190.0110.00514.82
7.2.180.0060.00914.83
7.2.170.0030.01214.94
7.2.60.0030.01316.55
7.2.00.0000.01119.16
7.1.330.0080.00515.76
7.1.320.0080.00515.78
7.1.310.0000.01415.72
7.1.300.0030.00815.75
7.1.290.0000.01215.86
7.1.280.0060.00515.73
7.1.270.0070.00515.73
7.1.260.0070.00715.71
7.1.200.0000.01415.83
7.1.100.0060.00918.25
7.1.70.0040.00417.04
7.1.60.1370.01733.38
7.1.50.1030.01032.99
7.1.40.2030.02032.71
7.1.30.2670.02032.64
7.1.20.1700.01032.63
7.1.10.1230.01314.70
7.1.00.1570.01014.50
7.0.200.2030.01315.02
7.0.190.2170.01315.00
7.0.180.2800.01314.36
7.0.170.2300.01714.49
7.0.160.1700.01014.58
7.0.150.1330.00714.60
7.0.140.1630.01014.49
7.0.130.1300.01314.80
7.0.120.1330.01014.60
7.0.110.1170.01014.64
7.0.100.1200.01014.42
7.0.90.1170.01014.50
7.0.80.1100.01014.41
7.0.70.1100.01014.67
7.0.60.1570.01014.18
7.0.50.1200.01014.42
7.0.40.1100.01714.52
7.0.30.1530.00314.56
7.0.20.1030.00714.53
7.0.10.1270.01014.50
7.0.00.1130.01014.49

preferences:
44.79 ms | 400 KiB | 5 Q