Hi,
Our applications logs the execution time of each PHP scripts. We have noticed that there are many times when the execution time of a script's logged in logs are very high (anywhere between 400 seconds to 1400 seconds). The way we find the execution time of script is simple, we call getmicrotime() on header and footer and find a difference to get execution time.
Function getmicrotime() function is as follows:
function getmicrotime(){
list($usec, $sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
}
We have limited max_execution_time of a script as 60 seconds in php.ini still scripts running for more then 400 seconds is baffling. We do not have set_time_limit in our code. We would like to know why does script execution do not terminate after max_execution_time. Any insights into the problem would be helpful.
Thanks.
Nikunj