- var_dump: documentation ( source)
- microtime: documentation ( source)
- method_exists: documentation ( source)
<?php
class a
{
public function test()
{
if (method_exists($this, 'init'))
{
$this->init();
}
}
}
$a = new a;
$s = microtime(true);
for ($i = 0; $i<10000; $i++)
{
$a->test();
}
var_dump(microtime(true) - $s);