3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo {} $foo = new Foo; $rounds = 1000000; $start = microtime(true); for($i=0; $i<$rounds; $i++) { echo get_class($foo); } echo (microtime(true) - $start); echo "\n"; $name = (new ReflectionClass($foo))->getName(); $start = microtime(true); for($i=0; $i<$rounds; $i++) { echo $name; } echo (microtime(true) - $start);

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.1.70.0100.00717.19
7.1.60.0030.01519.33
7.1.50.0290.01317.20
7.0.200.0100.00716.85

preferences:
36.04 ms | 401 KiB | 5 Q