A function that calculates the running time of a php page.
Copy code The code is as follows:
/*
@ Calculate php Program running time
*/
function microtime_float()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$ usec + (float)$sec);
}
//Start timing and place it at the top
$starttime = microtime_float();
//End timing and place it at the bottom
$runtime = number_format((microtime_float() – $starttime), 4).'s';
//Output
echo 'RunTime:'.$runtime;
?>
http://www.bkjia.com/PHPjc/327955.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/327955.htmlTechArticleA function that calculates the running time of a php page. Copy the code as follows: ?php /* @ Calculate the running time of the php program*/ function microtime_float() { list($usec, $sec) = explode(" ",...