php计算代码的执行时间

//Create a variable for start time<br>
$time_start = microtime(true);<br>
// Place your PHP/HTML/JavaScript/CSS/Etc. Here<br>
//Create a variable for end time<br>
$time_end = microtime(true);<br>
//Subtract the two times to get seconds<br>
$time = $time_end - $time_start;<br>
echo 'Script took '.$time.' seconds to execute';<br>
原文地址:https://www.cnblogs.com/csjoz/p/7244023.html