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++) { get_class($foo); } echo (microtime(true) - $start); echo "\n"; $reflectionClass = new ReflectionClass($foo); $start = microtime(true); for($i=0; $i<$rounds; $i++) { $reflectionClass->getName(); } echo (microtime(true) - $start); echo "\n"; $start = microtime(true); for($i=0; $i<$rounds; $i++) { $reflectionClass = new ReflectionClass($foo); $reflectionClass->getName(); } echo (microtime(true) - $start);

preferences:
35.43 ms | 405 KiB | 6 Q