3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [ 1,2,3, [4,5], [6,7], ]; $f = function (array $array) use (&$f) { if (is_array($array)) { yield from f($array); } else { yield $array } }; foreach ($f($a) as $v) { echo $v; }

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)
7.0.10.0130.06320.31
7.0.00.0100.08320.18
5.6.160.0200.07720.54
5.6.150.0030.04718.12
5.6.140.0030.08018.18
5.6.130.0100.07718.14
5.6.120.0100.03721.12
5.6.110.0230.07021.02
5.6.100.0070.08320.98
5.6.90.0100.04321.08
5.6.80.0070.08020.41
5.5.300.0000.04718.03
5.5.290.0030.06318.04
5.5.280.0030.07020.75
5.5.270.0130.06320.87
5.5.260.0200.07020.95
5.5.250.0100.08020.50
5.5.240.0130.06320.26

preferences:
142.63 ms | 1394 KiB | 7 Q