3v4l.org

run code in 300+ PHP versions simultaneously
<?php function yieldMe() : iterable { yield 1; yield 2; yield 3; } function someFunction(bool $toArray=true) : iterable { $found = yieldMe(); if($toArray){ return iterator_to_array($found); } yield from $found; } $result = someFunction(); foreach($result as $r){ echo $r."\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.5.30.0110.00719.52
8.5.20.0040.00319.53
8.5.10.0090.01016.56
8.5.00.0120.01020.21
8.4.180.0120.01019.61
8.4.170.0120.01020.45
8.4.160.0150.00821.48
8.4.150.0090.00516.84
8.4.140.0120.00917.61
8.4.130.0120.00917.95
8.4.120.0060.00220.55
8.4.110.0100.00918.96
8.4.100.0130.00817.50
8.4.90.0070.00117.96
8.4.80.0100.00919.54
8.4.70.0130.00817.98
8.4.60.0160.00918.52
8.4.50.0110.01018.55
8.4.40.0070.01119.24
8.4.30.0120.00620.27
8.4.20.0040.00718.68
8.4.10.0180.00419.25
8.3.300.0130.00818.20
8.3.290.0090.01020.75
8.3.280.0110.01018.38
8.3.270.0120.00716.47
8.3.260.0090.00216.44
8.3.250.0100.00918.87
8.3.240.0110.00916.53
8.3.230.0120.00616.44
8.3.220.0070.00118.42
8.3.210.0050.00316.58
8.3.200.0020.00716.59
8.3.190.0120.00817.00
8.3.180.0110.00416.41
8.3.170.0060.01216.55
8.3.160.0150.00616.37
8.3.150.0080.00017.19
8.3.140.0080.00017.28
8.3.130.0040.00418.30
8.3.120.0000.00919.09
8.3.110.0110.00820.94
8.3.100.0050.00324.06
8.3.90.0040.00426.77
8.3.80.0030.00716.38
8.3.70.0140.00716.63
8.3.60.0040.01118.43
8.3.50.0100.01016.34
8.3.40.0040.01118.37
8.3.30.0110.00718.71
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0080.00026.16
8.2.300.0110.00922.18
8.2.290.0050.00418.84
8.2.280.0080.00318.61
8.2.270.0090.00916.38
8.2.260.0160.00318.64
8.2.250.0090.00918.40
8.2.240.0100.01016.47
8.2.230.0030.00522.58
8.2.220.0070.00337.54
8.2.210.0000.00726.77
8.2.200.0090.00316.23
8.2.190.0140.00716.58
8.2.180.0110.00425.92
8.2.170.0060.01318.96
8.2.160.0030.01022.96
8.2.150.0050.00325.66
8.2.140.0080.00024.66
8.2.130.0060.00326.16
8.2.120.0070.00026.35
8.2.110.0070.00321.18
8.2.100.0080.00417.78
8.2.90.0000.00817.63
8.2.80.0030.00518.79
8.2.70.0080.00017.50
8.2.60.0030.00618.03
8.2.50.0030.00518.05
8.2.40.0080.00019.57
8.2.30.0000.00717.92
8.2.20.0040.00417.97
8.2.10.0060.00319.17
8.2.00.0000.00719.12
8.1.340.0140.00617.58
8.1.330.0120.00616.16
8.1.320.0050.00416.14
8.1.310.0120.00616.71
8.1.300.0040.00417.79
8.1.290.0030.00630.84
8.1.280.0090.00925.92
8.1.270.0070.00023.99
8.1.260.0000.00728.09
8.1.250.0000.00828.09
8.1.240.0030.00619.58
8.1.230.0040.00719.25
8.1.220.0060.00317.76
8.1.210.0040.00418.77
8.1.200.0050.00517.48
8.1.190.0000.00817.48
8.1.180.0000.00818.10
8.1.170.0040.00418.39
8.1.160.0070.00018.88
8.1.150.0040.00418.83
8.1.140.0040.00418.93
8.1.130.0070.00019.14
8.1.120.0000.00717.48
8.1.110.0000.00717.45
8.1.100.0000.00717.50
8.1.90.0070.00017.45
8.1.80.0030.00617.47
8.1.70.0030.00617.48
8.1.60.0050.00317.48
8.1.50.0050.00317.52
8.1.40.0060.00317.57
8.1.30.0030.00617.65
8.1.20.0080.00017.67
8.1.10.0030.00617.55
8.1.00.0040.00417.39
8.0.300.0020.00518.77
8.0.290.0080.00016.75
8.0.280.0030.00318.46
8.0.270.0040.00418.01
8.0.260.0060.00016.83
8.0.250.0020.00516.95
8.0.240.0030.00316.85
8.0.230.0000.00716.92
8.0.220.0000.00716.81
8.0.210.0030.00316.88
8.0.200.0060.00017.02
8.0.190.0040.00416.84
8.0.180.0040.00416.77
8.0.170.0000.00916.81
8.0.160.0030.00416.86
8.0.150.0000.00716.86
8.0.140.0000.00716.81
8.0.130.0000.00613.37
8.0.120.0000.00716.89
8.0.110.0030.00516.87
8.0.100.0040.00416.75
8.0.90.0070.00016.96
8.0.80.0060.00916.88
8.0.70.0000.00816.77
8.0.60.0000.00716.70
8.0.50.0040.00416.88
8.0.30.0080.00916.86
8.0.20.0110.00916.90
8.0.10.0090.01016.96
8.0.00.0140.00717.03
7.4.330.0000.00515.55
7.4.320.0070.00016.51
7.4.300.0000.00816.52
7.4.290.0000.00816.53
7.4.280.0040.00416.49
7.4.270.0070.00016.61
7.4.260.0030.00313.30
7.4.250.0000.00816.56
7.4.240.0050.00216.46
7.4.230.0000.00716.61
7.4.220.0020.00616.59
7.4.210.0100.00616.55
7.4.200.0070.00016.39
7.4.160.0100.01216.61
7.4.150.0110.01116.66
7.4.140.0110.01016.51
7.4.130.0080.01316.49
7.4.120.0130.00816.44
7.4.110.0090.00916.56
7.4.100.0120.00716.45
7.4.90.0100.00916.46
7.4.80.0080.01316.43
7.4.70.0110.00816.54
7.4.60.0080.01016.42
7.4.50.0080.01016.34
7.4.40.0110.00816.43
7.4.30.0120.01016.49
7.4.20.0110.01316.52
7.4.10.0160.00316.37
7.4.00.0130.00916.53
7.3.330.0070.00016.40
7.3.320.0040.00413.13
7.3.310.0040.00416.40
7.3.300.0030.00616.30
7.3.290.0100.00716.25
7.3.270.0030.01516.29
7.3.260.0120.00816.27
7.3.250.0080.01116.33
7.3.240.0080.01016.33
7.3.230.0120.00916.24
7.3.220.0080.00916.21
7.3.210.0100.00816.22
7.3.200.0070.01016.23
7.3.190.0060.01216.23
7.3.180.0060.01016.19
7.3.170.0050.01416.20
7.3.160.0080.01016.21
7.3.150.0120.00716.25
7.3.140.0120.01016.22
7.3.130.0130.01016.23
7.3.120.0120.00816.22
7.3.110.0120.00916.17
7.3.100.0100.00916.21
7.3.90.0160.00516.47
7.3.80.0080.00916.22
7.3.70.0050.01116.31
7.3.60.0090.01116.40
7.3.50.0080.00816.37
7.3.40.0090.01016.37
7.3.30.0020.01816.38
7.3.20.0060.01316.45
7.3.10.0020.01516.33
7.3.00.0230.00816.31

preferences:
89.66 ms | 1349 KiB | 5 Q