3v4l.org

run code in 300+ PHP versions simultaneously
<?php class base {} ; class foo extends base { protected $a; public function __construct(){ $a = get_called_class(); } } class bar extends base { protected $a; public function __construct(){ $a = get_class($this); } } $time = microtime(true); for($x=0;$x<10000;$x++){ $foo = new foo(); } echo round(microtime(true) - $time, 5)." s\n"; $time = microtime(true); for($x=0;$x<10000;$x++){ $foo = new bar(); } echo round(microtime(true) - $time, 5)." s\n";

preferences:
38.72 ms | 402 KiB | 5 Q