php计算程序执行时间

$s = microtime(true);
for ($i = 1; $i < 10000; $i += 1) {
  // function()
}
$e = microtime(true);
echo $e - $s;
原文地址:https://www.cnblogs.com/maidongdong/p/12719798.html