3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mandatory = function () { throw new Exception('Mandatory Argument is Missing'); }; function hello($argument = $mandatory) { echo $argument, PHP_EOL; } try { hello('Hello World'); hello(); } catch (Exception $e) { echo $e->getMessage(), PHP_EOL; }

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.0030.09020.06
7.0.00.0070.08020.33
5.6.160.0030.04020.55
5.6.150.0130.06718.18
5.6.140.0130.08018.23
5.6.130.0030.05318.28
5.6.120.0070.05321.14
5.6.110.0130.07721.02
5.6.100.0170.06721.12
5.6.90.0000.05721.01
5.6.80.0130.07320.41
5.5.300.0030.04718.00
5.5.290.0030.04317.92
5.5.280.0000.04320.77
5.5.270.0030.04720.96
5.5.260.0100.06720.89
5.5.250.0130.08020.55
5.5.240.0200.07020.23

preferences:
141.91 ms | 1394 KiB | 7 Q