- set_error_handler: documentation ( source)
<?php
function myErrorHandler($errno, $errstr, $errfile, $errline) {
if ( E_RECOVERABLE_ERROR===$errno ) {
echo "'catched' catchable fatal error\n";
return true;
}
return false;
}
set_error_handler('myErrorHandler');
$a = null;
$a->method_a();
echo 'done.';