您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

php计算一个页面执行时间函数写法

2024/5/22 4:35:22发布34次查看
<?php /* @ 计算php程序运行时间 */ function microtime_float() { list($usec, $sec) = explode(” “, microtime()); return ((float)$usec + (float)$sec); } //开始计时,放在头部 $starttime = microtime_float(); //结束计时,放在最底部 $runtime = number_format((microtime_float() – $starttime), 4).'s'; //输出 echo ‘runtime:'.$runtime; ?>
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product