- microtime: documentation ( source)
<?php
class Foo {}
$foo = new Foo;
$start = microtime(true);
echo get_class($foo);
echo (microtime(true) - $start);
echo "\n";
$start = microtime(true);
echo (new ReflectionClass($foo))->getName();
echo (microtime(true) - $start);