When you register a function in register_shutdown_function how can you check for the error max execution time limit?
register_shutdown_function(function(){
if(something)){
// max execution time exceeded
}
});
When you register a function in register_shutdown_function how can you check for the error max execution time limit?
register_shutdown_function(function(){
if(something)){
// max execution time exceeded
}
});
You can set a variable in the start of script to get time script execution started and if you reach here register_shutdown_function(function(){ calculate difference between that time and current time if it's greater than the time you have for execution(default 30 sec.) it's max execution time limit error
You just have to get last error with error_get_last() and check if it says that maximum execution time exceeded.