$starttime = microtime(true); // Top of page
// Code
$endtime = microtime(true); // Bottom of page
$time_taken =($endtime - $starttime)*1000;
$time_taken = round($time_taken,5); // 5 is nothing but Precision
print("Page loaded in seconds", $time_taken );