I can use set_error_handler() to catch most PHP errors, but it doesn\'t work for fatal (E_ERROR) errors, such as calling a function that doesn\'t e
set_error_handler()
E_ERROR
Here is just a nice trick to get the current error_handler method =)
Also I want to note that if you call
PHP stops displaying the error. Otherwise, the error text will be send to the client prior to your error handler.