$t1 = microtime(true); sleep(3); $t2 = microtime(true); echo '程序耗时'.round($t2-$t1,3).'秒'; 转载于:https://www.cnblogs.com/hejianrong/p/9936460.html