F.11. Error Handling
Function | Returns | Description |
---|---|---|
error_log(string message [, int message_type [, string destination [, string extra_headers]]]) | bool | Sends an error message somewhere. |
debug_print_backtrace(void) */ | void | Prints a backtrace. |
debug_backtrace(void) | array | Returns backtrace as array. |
restore_error_handler(void) | void | Restores the previously defined error handler function. |
set_exception_handler(string exception_handler) | string | Sets a user-defined exception handler function. Returns the previously defined exception handler, or false on error. |
restore_exception_handler(void) | void | Restores the previously defined exception handler function. |
trigger_error(string messsage [, int error_type]) | void | Generates a user-level error/warning/notice message. |
set_error_handler(string error_handler) | string | Sets a user-defined error handler function. Returns the previously defined error handler, or false on error. |
leak(int num_bytes=3) | void | Causes an intentional memory leak, for testing/debugging purposes. |
Get Web Standards Programmer's Reference: HTML, CSS, JavaScript®, Perl, Python®, and PHP now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.