function getmicrotime(){ 
    list($usec, $sec) = explode(" ",microtime()); 
    return ((float)$usec + (float)$sec); 
    } $time_start = getmicrotime();
    
for ($i=0; $i < 1000; $i++){
    //do nothing, 1000 times
    }$time_end = getmicrotime();
$time = $time_end - $time_start;不用直接用time()测试速度,单位太大了...你可以用上面这段代码..