September 2001
Intermediate to advanced
768 pages
32h 45m
English
string set_error_handler(string handler_name) Uses a custom error handler to catch errors.
Returns:
Name of the previous error handler; NULL if the previous error handler was PHP’s built-in handler
Description:
set_error_handler() allows a user-defined function to be used as a custom error handler for errors triggered with trigger_error() and errors of the E_NOTICE, E_WARNING, and E_ERROR level.
Custom error handlers provide a simple way to separate your error-handling code from the code that triggers the error.
The user-defined function that handles the triggered errors can be as simple or elaborate as desired.
The function is passed two arguments. The first required argument is the level of the triggered error (USER_WARNING ...
Read now
Unlock full access