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);

preferences:
26.54 ms | 402 KiB | 5 Q