zend_error() can be used to generate error messages.
This function accepts two arguments; the first is the error type (see
zend_errors.h), and the second is the error message.
zend_error(E_WARNING, "This function has been called with empty arguments");
shows a list of possible values (see Figure 36-1
values are also referred to in php.ini
. Depending on
which error type you choose, your messages will be logged.
Table 36-1. Zend's Predefined Error Messages.
Signals an error and terminates execution of the script
Signals a generic warning. Execution continues.
Signals a parser error. Execution continues.
Signals a notice. Execution continues. Note that by
default the display of this type of error messages is turned off in
Internal error by the core; shouldn't be used by
Internal error by the compiler; shouldn't be used by
Internal warning by the compiler; shouldn't be used by
Figure 36-1. Display of warning messages in the browser.