3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ 'lala' => 123, 'lulu' => [ 'foo' => 'bar', 'wurs' => [ 'erdbaer', 'kaese' ] ], 'err' => [ 'da' => [ 'fuq' => 'yaye' ] ] ]; $it = new RecursiveArrayIterator($arr); $func = function(RecursiveArrayIterator $it) { while ($it->valid()) { $it->next(); } } iterator_apply($it, $func, [$it]); echo '<pre>' . __FILE__ . ' on line ' . __LINE__ . PHP_EOL; print_r($it->getArrayCopy()); exit;

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.2.20.0100.00919.63
7.2.10.0130.00719.58
7.2.00.0080.01319.57
7.1.140.0060.01018.21
7.1.130.0090.01218.53
7.1.120.0080.00918.23
7.1.110.0090.01117.66
7.1.100.0090.01217.69
7.1.90.0100.01017.93
7.1.80.0070.01318.01
7.1.70.0060.01117.09
7.1.60.0300.01734.93
7.1.50.0270.01734.64
7.1.40.0330.01634.19
7.1.30.0230.02134.51
7.1.20.0270.01034.37
7.1.10.0020.01416.11
7.1.00.0040.01116.36

preferences:
141.66 ms | 1394 KiB | 7 Q