测试代码执行时间
<?php
$time_start = getmicrotime();
function getmicrotime()
{
list($usec, $sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
}
//待测试代码段
$time_end = getmicrotime();
printf ("[页面执行时间: %.2f毫秒]\n\n",($time_end - $time_start)*1000);
?>