3v4l.org

run code in 300+ PHP versions simultaneously
<?php function gen(): Generator { yield new stdClass() => 'foo'; yield ['a'] => 'foo'; yield gen2() => 'foo'; yield fn($a) => 'b' => 'c'; } function gen2(): Generator { yield 'bar'; } gen(); foreach(gen() as $key => $value) { var_dump($key, $value); }
based on YLt4O

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.0.30.0100.00616.90
8.0.20.0030.01316.94
8.0.10.0140.00917.06
8.0.00.0140.00617.04
7.4.160.0070.01316.52
7.4.150.0160.00716.44
7.4.140.0130.00916.55
7.4.130.0070.00716.31
7.4.120.0030.01016.43
7.4.110.0070.01416.60
7.4.100.0110.00416.63
7.4.90.0060.00916.31
7.4.80.0080.00816.47
7.4.70.0070.01016.49
7.4.60.0060.00816.33
7.4.50.0090.00616.38
7.4.40.0070.00716.38
7.4.30.0090.00616.49
7.4.20.0070.01116.46
7.4.10.0040.01116.48
7.4.00.0030.01116.61
7.3.270.0160.00616.05
7.3.260.0030.01116.19
7.3.250.0060.00816.10
7.3.240.0130.00316.20
7.3.230.0030.01116.12
7.3.220.0110.00416.12
7.3.210.0140.00316.12
7.3.200.0070.00716.07
7.3.190.0030.01216.16
7.3.180.0100.00316.05
7.3.170.0030.01116.14
7.3.160.0110.00416.03
7.3.150.0090.00916.15
7.3.140.0110.00416.14
7.3.130.0070.00716.11
7.3.120.0060.00816.12
7.3.110.0070.00715.99
7.3.100.0070.00716.03
7.3.90.0100.00316.35
7.3.80.0060.00916.05
7.3.70.0060.00816.23
7.3.60.0110.00816.20
7.3.50.0110.00616.24
7.3.40.0130.00616.22
7.3.30.0040.01616.20
7.3.20.0030.01216.29
7.3.10.0070.01416.14
7.3.00.0050.00916.15