Example of method to capture timeout event in PHP, php capture timeout example_PHP tutorial

WBOY
Release: 2016-07-13 10:07:02
Original
1335 people have browsed it

Examples of methods to capture timeout events in PHP, PHP capture timeout examples

set_error_handler() cannot catch fatal errors (see the manual for specific error types).

So the following method is needed:

<&#63;php
ini_set ( 'max_execution_time', 1 );
function shutdown() {
 $a = error_get_last ();
 print_r ( $a );
}
register_shutdown_function ( 'shutdown' );
while ( true ) {
}

Copy after login

Note: sleep() pause time is not included in max_execution_time.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/957121.htmlTechArticleMethod instance for capturing timeout event in PHP, php capture timeout instance set_error_handler() cannot capture fatal error (specific error type See manual). So the following method is needed: phpini_set (...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!