3v4l.org

run code in 300+ PHP versions simultaneously
<?php (version_compare(PHP_VERSION, '7.0', '>=') || defined('HHVM_VERSION')) ? declare(strict_types=1) : ''; function foo(int $foo) { echo $foo; } foo(1); foo('hi');

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.00.0030.04320.32
5.6.160.0130.07720.39
5.6.150.0030.05018.21
5.6.140.0100.04318.18
5.6.130.0170.03018.17
5.6.120.0130.07321.09
5.6.110.0100.08321.11
5.6.100.0130.05721.13
5.6.90.0100.06721.10
5.6.80.0070.07720.50
5.5.300.0000.04318.02
5.5.290.0030.07317.91
5.5.280.0000.04320.88
5.5.270.0070.03720.76
5.5.260.0000.06020.95
5.5.250.0000.07320.61
5.5.240.0270.06720.23

preferences:
137.23 ms | 1398 KiB | 7 Q