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()) { echo get_class($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.0180.00016.50
8.3.50.0140.00016.14
8.3.40.0000.01418.86
8.3.30.0040.01118.75
8.3.20.0080.00019.15
8.3.10.0080.00021.91
8.3.00.0040.00419.35
8.2.180.0170.00316.50
8.2.170.0040.01122.96
8.2.160.0100.00320.43
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0070.00020.52
8.2.120.0040.00426.35
8.2.110.0000.00822.01
8.2.100.0090.00317.72
8.2.90.0050.00317.63
8.2.80.0000.00818.83
8.2.70.0050.00318.05
8.2.60.0040.00417.63
8.2.50.0090.00017.63
8.2.40.0050.00519.27
8.2.30.0030.00320.57
8.2.20.0090.00018.00
8.2.10.0050.00218.11
8.2.00.0040.00418.07
8.1.280.0150.00425.92
8.1.270.0000.00823.96
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0030.00623.79
8.1.230.0040.00719.15
8.1.220.0040.00417.77
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0000.00917.35
8.1.180.0030.00618.10
8.1.170.0000.00818.91
8.1.160.0040.00418.86
8.1.150.0040.00418.77
8.1.140.0070.00419.49
8.1.130.0000.00718.95
8.1.120.0000.00717.43
8.1.110.0030.00517.35
8.1.100.0080.00017.47
8.1.90.0070.00417.35
8.1.80.0050.00317.46
8.1.70.0030.00317.46
8.1.60.0070.00017.57
8.1.50.0080.00017.52
8.1.40.0080.00017.55
8.1.30.0040.00417.52
8.1.20.0050.00217.60
8.1.10.0000.00817.44
8.1.00.0060.00317.41
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0030.00318.45
8.0.270.0040.00417.27
8.0.260.0000.00616.83
8.0.250.0000.00717.00
8.0.240.0030.00516.92
8.0.230.0000.00716.91
8.0.220.0030.00316.92
8.0.210.0000.00716.87
8.0.200.0060.00016.97
8.0.190.0050.00516.94
8.0.180.0000.00716.92
8.0.170.0050.00316.84
8.0.160.0030.00516.95
8.0.150.0040.00416.79
8.0.140.0030.00516.76
8.0.130.0050.00013.40
8.0.120.0040.00416.77
8.0.110.0030.00316.76
8.0.100.0000.00716.93
8.0.90.0000.00716.78
8.0.80.0030.01316.80
8.0.70.0040.00416.71
8.0.60.0080.00016.79
8.0.50.0040.00416.93
8.0.30.0090.01017.04
8.0.20.0120.00717.40
8.0.10.0000.00716.95
8.0.00.0140.00716.86
7.4.330.0050.00015.55
7.4.320.0040.00416.55
7.4.300.0000.00616.41
7.4.290.0070.00016.42
7.4.280.0000.00816.64
7.4.270.0000.00716.62
7.4.260.0030.00313.27
7.4.250.0030.00316.55
7.4.240.0000.00816.61
7.4.230.0000.00716.59
7.4.220.0090.00916.70
7.4.210.0040.01116.53
7.4.200.0000.00716.62
7.4.160.0070.01016.48
7.4.150.0170.00317.40
7.4.140.0110.01117.86
7.4.130.0130.00716.55
7.4.120.0090.01216.44
7.4.110.0130.00916.44
7.4.100.0090.00916.52
7.4.90.0120.00616.35
7.4.80.0090.00919.39
7.4.70.0060.01016.59
7.4.60.0100.00616.52
7.4.50.0070.01016.45
7.4.40.0040.01116.52
7.4.30.0080.00816.47
7.4.00.0050.01015.03
7.3.330.0030.00313.38
7.3.320.0000.00613.32
7.3.310.0030.00616.34
7.3.300.0000.00716.31
7.3.290.0100.00416.34
7.3.280.0090.00716.35
7.3.270.0030.01417.40
7.3.260.0110.00916.56
7.3.250.0120.00816.34
7.3.240.0110.00816.65
7.3.230.0170.00316.56
7.3.210.0140.00416.25
7.3.200.0120.00616.62
7.3.190.0070.01316.28
7.3.180.0120.00316.43
7.3.170.0130.00316.67
7.3.160.0030.01216.63
7.3.120.0070.01114.98
7.3.110.0030.01415.00
7.3.100.0000.01515.00
7.3.90.0100.00714.89
7.3.80.0030.00914.77
7.3.70.0060.01014.82
7.3.60.0120.00014.82
7.3.50.0040.00914.71
7.3.40.0070.01114.89
7.3.30.0110.00314.52
7.3.20.0030.00716.72
7.3.10.0070.00716.71
7.3.00.0070.00516.60
7.2.330.0130.00416.75
7.2.320.0080.01516.56
7.2.310.0080.00816.63
7.2.300.0030.01316.63
7.2.290.0000.01716.79
7.2.250.0060.00915.21
7.2.240.0070.01415.21
7.2.230.0100.00614.92
7.2.220.0100.00715.02
7.2.210.0060.00315.04
7.2.200.0030.00714.86
7.2.190.0040.01115.10
7.2.180.0030.00715.00
7.2.170.0100.00715.02
7.2.130.0100.00316.82
7.2.120.0060.00916.97
7.2.110.0030.00616.96
7.2.100.0080.00416.93
7.2.90.0060.00316.70
7.2.80.0080.00416.84
7.2.70.0120.00016.93
7.2.60.0070.00616.75
7.2.50.0080.00416.88
7.2.40.0040.00817.00
7.2.30.0090.00317.06
7.2.20.0060.00616.74
7.2.10.0030.00716.68
7.2.00.0050.00818.09
7.1.330.0040.01115.84
7.1.320.0080.00415.89
7.1.310.0040.00815.47
7.1.300.0040.01115.55
7.1.290.0100.00615.83
7.1.280.0060.00915.53
7.1.270.0000.01115.62
7.1.260.0070.00715.68
7.1.250.0030.00615.71
7.1.200.0060.00315.48
7.1.100.0030.01318.20
7.1.70.0000.01117.22
7.1.60.0700.01033.11
7.1.50.1570.00332.98
7.1.40.0700.01332.80
7.1.30.0230.01032.80
7.1.20.1300.01032.75
7.1.10.0070.00714.79
7.1.00.0070.00714.82
7.0.200.0030.01014.82
7.0.190.1370.01014.65
7.0.180.0070.00314.45
7.0.170.0070.01014.51
7.0.160.0030.01014.48
7.0.150.0030.01014.33
7.0.140.0070.00714.61
7.0.130.1300.01714.57
7.0.120.0070.00314.75
7.0.110.1470.00314.47
7.0.100.1430.00714.56
7.0.90.1370.01314.47
7.0.80.0000.01314.48
7.0.70.0070.01014.44
7.0.60.0500.01014.48
7.0.50.0100.00714.46
7.0.40.0170.00714.75
7.0.30.0270.00314.59
7.0.20.0070.01014.51
7.0.10.0370.00714.72
7.0.00.0870.01314.78

preferences:
55.87 ms | 401 KiB | 5 Q