- microtime: documentation ( source)
- method_exists: documentation ( source)
<?php
class Test {
public function read() {
}
}
$test = new Test();
$i = 0;
$start = microtime(true);
while( $i < 1000000) {
method_exists($test, 'read');
$i++;
}
$end = microtime(true);
echo PHP_EOL . $end - $start;