- microtime: documentation ( source)
<?php
function bench($fn)
{
$start = microtime(true);
for($i = 0; $i < 200000; $i++)
$fn();
$end = microtime(true);
echo("Time: " . ($end - $start) . "\n");
}
bench(function() { 1 == 0; });
bench(function() { 1 === 0; });
?>