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");
Table 9.16 shows a list of possible values (see Figure 9.8). These
values are also referred to in php.ini. Depending on
which error type you choose, your messages will be logged.