setting my own error_handler does not cacth run-time fatal error,
WHY?
see the simple code below:
<?php
function error_handler ($level, $message, $file, $line, $context) {
echo 'Do you see me ?<br>';
echo "$level, $message<br>";
echo 'ERROR:<blockquote>';
print_r ($context);
print "\n</blockquote>";
}
$ret = set_error_handler('error_handler');
$ret = set_error_handler('error_handler');
if ($ret == FALSE){
echo "error_handler is <b>NOT</b>set !<br>";
}else{
echo "error_handler is set !<br>";
}
$IamNotAnObject = 1;
echo 'next line will cause a fatal error...<br>';
$IamNotAnObject->IamNotAMethod();
?>