php 程序执行时间检测

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

  

posted @ 2021-06-02 11:03  Microtiger  阅读(44)  评论(0编辑  收藏  举报