For upcoming next tutorials we are going studying about PHP Error and there functions. The PHP Error function are used to deal with error handling and logging.
This functions allow us to define own error handling rules, and modify the way the errors can be logged and The logging functions allow us to send messages directly to other machines, emails, or system logs.
There are some types of PHP error and logging functions given below.
Function | Description |
---|---|
debug_backtrace() | Generates a backtrace |
debug_print_backtrace() | Prints a backtrace |
error_clear_last() | Clears the last error |
error_get_last() | Returns the last error that occurred |
error_log() | Sends an error message to a log, to a file, or to a mail account |
error_reporting() | Specifies which errors are reported |
restore_error_handler() | Restores the previous error handler |
restore_exception_handler() | Restores the previous exception handler |
set_error_handler() | Sets a user-defined error handler function |
set_exception_handler() | Sets a user-defined exception handler function |
trigger_error() | Creates a user-level error message |
user_error() | Alias of trigger_error() |