3v4l.org

run code in 300+ PHP versions simultaneously
<?php function mandatory() { 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.0070.06720.30
7.0.00.0070.04720.23
5.6.160.0030.04320.71
5.6.150.0100.07718.29
5.6.140.0130.07318.11
5.6.130.0030.05718.24
5.6.120.0030.05021.05
5.6.110.0030.04320.99
5.6.100.0170.08021.14
5.6.90.0170.07320.96
5.6.80.0130.07320.39
5.5.300.0100.08017.95
5.5.290.0130.07317.98
5.5.280.0000.05320.97
5.5.270.0100.08320.68
5.5.260.0000.08720.84
5.5.250.0100.08020.71
5.5.240.0070.04020.28

preferences:
140.81 ms | 1394 KiB | 7 Q