set_error_handler()不能捕获致命错误(具体错误类型见手册)。
所以需要如下方法:
<?phpini_set ( 'max_execution_time', 1 );function shutdown() { $a = error_get_last (); print_r ( $a );}regist<i>*本5文来源gaodai$ma#com搞$$代**码)网@</i><img>搞代码gaodaima</img>er_shutdown_function ( 'shutdown' );while ( true ) {}
注意:sleep()停顿时间不算在max_execution_time中。