PHP检测每一段代码执行时间

$t1 = microtime(true);
sleep(3);
$t2 = microtime(true);
echo '程序耗时'.round($t2-$t1,3).'秒';
相关文章
相关标签/搜索