<?php
function profile($dump = FALSE)
{
static $profile;
if ($dump) {
$temp = $profile;
unset($profile);
return $temp;
}
$profile[] = microtime();
}
register_tick_function("profile");
profile();
declare(ticks=2) {
for ($x = 1; $x < 50; ++$x) {
echo similar_text(md5($x), md5($x*$x)), "<br />;";
}
}
print_r(profile(TRUE));
?>