首页 > 代码库 > PHP 性能监测

PHP 性能监测



function proStartTime() {
$mtime1 = explode(" ", microtime());
$startTime = $mtime1[1] + $mtime1[0];
return $startTime;
}

function proEndTime($startTime, $intro) {
$mtime2 = explode(" ", microtime());
$endtime = $mtime2[1] + $mtime2[0];
$totaltime = ($endtime - $startTime);
$totaltime = number_format($totaltime, 7);
echo $intro . " process time: ".$totaltime . ‘<br/>‘;
}

PHP 性能监测