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

$t1 = microtime(true);
sleep(3);
$t2 = microtime(true);
echo '程序耗时'.round($t2-$t1,3).'秒';

猜你喜欢

转载自www.cnblogs.com/hejianrong/p/9936460.html