PHP如何计算脚本执行时间

// 开始的时钟时间(秒)

$start_time = microtime(true);

内容

// 结束的时钟时间(秒)

$end_time = microtime(true);

// 计算脚本执行时间

$execution_time = ($end_time - $start_time);

posted @ 2022-01-05 11:16  冯元春  阅读(122)  评论(0编辑  收藏  举报