计算php 脚本运行时间

$t1 = microtime(true);
// ... 执行代码 ...
$t2 = microtime(true);
echo '耗时'.round($t2-$t1,3).'秒';

posted @ 2015-12-11 14:26  Sun丶老板  阅读(169)  评论(0编辑  收藏  举报