3v4l.org

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

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.0160.00318.43
8.3.50.0040.01116.71
8.3.40.0000.01418.70
8.3.30.0110.00418.67
8.3.20.0050.00318.95
8.3.10.0110.00421.79
8.3.00.0040.00419.54
8.2.180.0170.00016.50
8.2.170.0140.00722.96
8.2.160.0040.01120.44
8.2.150.0030.00525.66
8.2.140.0080.00024.66
8.2.130.0080.00020.51
8.2.120.0060.00326.35
8.2.110.0060.00319.13
8.2.100.0040.00717.84
8.2.90.0000.00819.18
8.2.80.0060.00318.02
8.2.70.0000.00917.63
8.2.60.0040.00418.04
8.2.50.0040.00418.10
8.2.40.0060.00322.14
8.2.30.0040.00421.08
8.2.20.0070.00317.94
8.2.10.0000.00718.07
8.2.00.0040.00418.01
8.1.280.0100.01025.92
8.1.270.0040.00422.05
8.1.260.0070.00026.35
8.1.250.0000.00728.09
8.1.240.0060.00319.54
8.1.230.0110.00017.42
8.1.220.0030.00617.78
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0080.00016.99
8.1.180.0050.00318.10
8.1.170.0030.00718.56
8.1.160.0030.00319.02
8.1.150.0000.00820.78
8.1.140.0000.00819.43
8.1.130.0070.00019.01
8.1.120.0040.00417.48
8.1.110.0040.00417.38
8.1.100.0000.00717.54
8.1.90.0060.00617.38
8.1.80.0030.00417.52
8.1.70.0000.00717.43
8.1.60.0040.00417.48
8.1.50.0050.00317.53
8.1.40.0040.00417.39
8.1.30.0000.00717.71
8.1.20.0050.00317.64
8.1.10.0040.00417.52
8.1.00.0000.00817.44
8.0.300.0070.00018.77
8.0.290.0040.00416.75
8.0.280.0000.00718.45
8.0.270.0070.00017.18
8.0.260.0030.00316.77
8.0.250.0040.00416.93
8.0.240.0040.00416.83
8.0.230.0000.00717.02
8.0.220.0040.00416.78
8.0.210.0070.00016.94
8.0.200.0040.00416.88
8.0.190.0040.00416.95
8.0.180.0040.00416.96
8.0.170.0040.00416.89
8.0.160.0000.00716.95
8.0.150.0000.00716.75
8.0.140.0000.01016.76
8.0.130.0050.00013.30
8.0.120.0070.00016.76
8.0.110.0050.00217.01
8.0.100.0000.00716.72
8.0.90.0040.00416.78
8.0.80.0070.01016.96
8.0.70.0000.00716.73
8.0.60.0040.00416.95
8.0.50.0040.00416.77
8.0.30.0100.00716.96
8.0.20.0100.01017.40
8.0.10.0040.00417.04
8.0.00.0130.00416.59
7.4.330.0000.00515.55
7.4.320.0030.00316.43
7.4.300.0060.00016.61
7.4.290.0030.00316.46
7.4.280.0020.00516.60
7.4.270.0000.00716.43
7.4.260.0030.00313.32
7.4.250.0030.00316.48
7.4.240.0040.00416.44
7.4.230.0000.00716.62
7.4.220.0090.00916.57
7.4.210.0090.00616.71
7.4.200.0030.00316.61
7.4.160.0110.00516.51
7.4.150.0060.01217.40
7.4.140.0150.00817.86
7.4.130.0160.00616.63
7.4.120.0090.01116.59
7.4.110.0120.00616.66
7.4.100.0090.01516.57
7.4.90.0070.01016.30
7.4.80.0120.01219.39
7.4.70.0110.01116.37
7.4.60.0060.01016.57
7.4.50.0070.00716.32
7.4.40.0100.00616.55
7.4.30.0050.01116.53
7.4.00.0080.01014.95
7.3.330.0060.00013.37
7.3.320.0000.00513.32
7.3.310.0000.00916.36
7.3.300.0030.00316.34
7.3.290.0090.00516.28
7.3.280.0080.00816.28
7.3.270.0080.01117.40
7.3.260.0110.01016.29
7.3.250.0070.01216.43
7.3.240.0070.01216.44
7.3.230.0060.00916.41
7.3.210.0090.00916.66
7.3.200.0080.00816.35
7.3.190.0060.01216.26
7.3.180.0100.00716.24
7.3.170.0100.00716.42
7.3.160.0000.01616.54
7.3.120.0000.01515.05
7.3.110.0040.01514.69
7.3.100.0090.00014.77
7.3.90.0090.00314.72
7.3.80.0000.01514.70
7.3.70.0060.00914.58
7.3.60.0060.00814.79
7.3.50.0030.00714.78
7.3.40.0060.00814.71
7.3.30.0030.01014.52
7.3.20.0110.00416.55
7.3.10.0080.00516.44
7.3.00.0030.00616.79
7.2.330.0130.00716.59
7.2.320.0120.00616.76
7.2.310.0130.00316.66
7.2.300.0050.01116.64
7.2.290.0090.00916.55
7.2.250.0070.01315.21
7.2.240.0070.01314.86
7.2.230.0070.01014.85
7.2.220.0030.00914.82
7.2.210.0090.00615.07
7.2.200.0090.00614.91
7.2.190.0040.01114.75
7.2.180.0000.01015.10
7.2.170.0040.01115.18
7.2.130.0080.00716.51
7.2.120.0070.00416.63
7.2.110.0070.00716.54
7.2.100.0070.00316.58
7.2.90.0080.00316.69
7.2.80.0050.00516.75
7.2.70.0090.00316.98
7.2.60.0080.00916.80
7.2.50.0070.00416.59
7.2.40.0070.00316.56
7.2.30.0000.01316.53
7.2.20.0070.01016.58
7.2.10.0090.00616.71
7.2.00.0080.00717.88
7.1.330.0040.01115.48
7.1.320.0090.00315.50
7.1.310.0070.00715.67
7.1.300.0070.00715.71
7.1.290.0110.00315.74
7.1.280.0120.00015.72
7.1.270.0000.01415.52
7.1.260.0080.00815.89
7.1.250.0040.00715.76
7.1.200.0040.00815.67
7.1.100.0040.00718.06
7.1.70.0040.00417.06
7.1.60.0400.01332.94
7.1.50.0370.01732.68
7.1.40.0430.01032.39
7.1.30.0500.00732.63
7.1.20.0430.01032.71
7.1.10.0330.01014.80
7.1.00.0330.01014.76
7.0.200.0330.01314.83
7.0.190.0270.01714.41
7.0.180.0300.01014.50
7.0.170.0370.00314.59
7.0.160.0300.01014.34
7.0.150.0300.01014.34
7.0.140.0270.01314.66
7.0.130.0300.01014.85
7.0.120.0400.00714.85
7.0.110.0330.01014.54
7.0.100.0330.00714.47
7.0.90.0330.01314.63
7.0.80.0370.01314.59
7.0.70.0330.01014.45
7.0.60.0330.01014.24
7.0.50.0430.00314.41
7.0.40.0300.01014.57
7.0.30.0300.01014.79
7.0.20.0370.00314.45
7.0.10.0400.00714.58
7.0.00.0370.01014.64

preferences:
45.46 ms | 400 KiB | 5 Q