PHP : Custom error handler - handling parse & fatal errors
How can i handle parse & fatal errors using a custom error handler? Simple Answer: You can't. See the manual : The following error types cannot be handled with a user defined function: E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING, and most of E_STRICT raised in the file where set_error_handler() is called. For every other error, you can use set_error_handler() EDIT: Since it seems, that there are some discussions on this topic, with regards to using register_shutdown_function , we should take a look at the definition of handling: To me, handling an error