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

php计算脚本执行时间

2024/3/28 23:15:53发布7次查看
利用php的microtime实现
function getcurrenttime () { list ($msec, $sec) = explode(" ", microtime()); return (float)$msec + (float)$sec; }
如何使用
$begin = getcurrenttime(); sleep(10); $end = getcurrenttime(); $spend = $end - $begin; echo "脚本执行时间为:".$spend."\n";
该用户其它信息

VIP推荐

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