Terry Very Good

[PHP] 수행시간 측정(microtime 함수 활용) 본문

프로그래밍/(WEB) PHP & JAVASCRIPT

[PHP] 수행시간 측정(microtime 함수 활용)

테리베리 2021. 11. 9. 13:26
728x90
반응형

시간 측정 할 때 이걸 쓰자

$start = microtime(true);
/*
시간 측정할 내용
*/
$end = microtime(true);
$time = $end - $start;
log_file($logfile, $sql." : ".number_format($time,6) . " 초 걸림");
//아니면 echo 사용해서 출력하면 된다~!!

 

728x90
반응형