PHP测试页面执行时间

PHP 1442 0 2013-04-30

PHP测试页面执行时间
function getmicrotime(){
   list($usec, $sec) = explode(" ",microtime());
   return ((float)$usec + (float)$sec);
   }

//开始
$time_start = getmicrotime();
//结束
$time_end = getmicrotime();

//输出运行总时间
$time = $time_end - $time_start;
echo "Did nothing in $time seconds($time_start/$time_end)";

上一篇:php-Mysql数据库用mysqli()与mysqli_connect()连接测试

下一篇:PHP字符串中的特殊字符转换为HTML实体

讨论数量:0

请先登录再发表讨论。 2024-04-29

天涯网魂
3 杠 5 星
TA 的文章
TA 的随言
TA 的资源链