Home > Article > Backend Development > Example of method to capture timeout events in PHP_PHP tutorial
This article mainly introduces examples of methods for capturing timeout events in PHP. This article directly gives sample code. Friends who need it can refer to it. Next
set_error_handler() cannot catch fatal errors (see the manual for specific error types).
So the following method is needed:
?
3 4 5
|
ini_set ( 'max_execution_time', 1 );
function shutdown() {
$a = error_get_last (); |