Web Hosting Talk







View Full Version : PHP5 : error handling problem


kailash
08-24-2005, 10:30 AM
This problem screwed up three hours of mine :|


<?php

function error_handler($errno, $errstr, $errfile, $errline) {
die('blah');
}

set_error_handler('error_handler');

foo();

?>


Calling the non existent function foo() is supposed to trigger the handler right?

All errors, warning,notices etc.. are caught by the handler, except for fatal errors. (E_ERROR) What am I doing wrong!???

btw, I'm using PHP5

anjanesh
08-24-2005, 12:17 PM
Fatal Errors dont seem to be caught.
http://marc.theaimsgroup.com/?l=php-dev&m=97673386418430&w=2