3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { static $f = 0; yield ++$f; yield from goo(); } function goo() { static $g = 'a'; yield ++$g; yield from foo(); } foreach (foo() as $foo) { print $foo.PHP_EOL; } ?>

Abusive script

This script was stopped while abusing our resources

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.4.130.0240.00927.19
8.4.120.0290.01830.23
8.4.110.0350.01828.34
8.4.100.0280.01321.98
8.4.90.0430.01125.50
8.4.80.0220.00925.76
8.3.250.0310.01829.06
8.3.240.0400.01427.64
8.3.230.0400.01926.74
8.3.180.0410.01724.02
8.3.50.0320.01823.29
8.2.290.0190.01223.13

preferences:
46.71 ms | 1045 KiB | 5 Q