Check time taken by any php function or whole file
<?PHP
function microtime_float()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
$time_start = microtime_float();
//any function here
$time_end = microtime_float();
$time = $time_end - $time_start;
echo "$time taken.";
?>