php计算程序执行时间

$s = microtime(true);
for ($i = 1; $i < 10000; $i += 1) {
  // function()
}
$e = microtime(true);
echo $e - $s;
posted @ 2020-04-17 14:31  仁义礼智信的  阅读(261)  评论(0)    收藏  举报