$t1 = microtime(true); //...要执行的代码$t2 = microtime(true); echo '耗时'.round($t2-$t1,3).'秒'; 转载于:https://www.cnblogs.com/already/p/5373212.html