3v4l.org

run code in 300+ PHP versions simultaneously
<?php function gen_one_to_three() { $y=[1,4,7]; foreach ($y as $x) { echo $x; if($x > 1): yield $x; } } $generator = gen_one_to_three(); foreach ($generator as $value) { echo "$value\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)
5.4.220.0080.04312.38
5.4.210.0100.03812.38
5.4.200.0110.04412.38
5.4.190.0090.04412.38
5.4.180.0090.04612.38
5.4.170.0090.04212.39
5.4.160.0080.04112.38
5.4.150.0060.04312.38
5.4.140.0080.04412.07
5.4.130.0070.04212.05
5.4.120.0080.04112.01
5.4.110.0110.04212.01
5.4.100.0070.04312.01
5.4.90.0090.04512.01
5.4.80.0070.04412.01
5.4.70.0090.04012.01
5.4.60.0100.04012.01
5.4.50.0060.03912.01
5.4.40.0080.04211.99
5.4.30.0090.03811.99
5.4.20.0060.03911.99
5.4.10.0080.03911.99
5.4.00.0090.04011.48
5.3.270.0080.04212.72
5.3.260.0110.04412.71
5.3.250.0130.04112.72
5.3.240.0080.04412.72
5.3.230.0090.04212.71
5.3.220.0070.03912.68
5.3.210.0090.04412.68
5.3.200.0100.04312.68
5.3.190.0090.05112.68
5.3.180.0110.05012.67
5.3.170.0080.04512.67
5.3.160.0080.05212.67
5.3.150.0140.05512.67
5.3.140.0100.04612.66
5.3.130.0100.05412.66
5.3.120.0090.04912.66
5.3.110.0120.05012.65
5.3.100.0080.05212.12
5.3.90.0120.05312.09
5.3.80.0090.04012.08
5.3.70.0090.04312.08
5.3.60.0110.04412.07
5.3.50.0100.04412.00
5.3.40.0070.04612.01
5.3.30.0070.03911.96
5.3.20.0060.03711.75
5.3.10.0110.03911.71
5.3.00.0090.04211.69

preferences:
137.44 ms | 1394 KiB | 7 Q