Jump to content
Larry Ullman's Book Forums

Chapter 8- Arguments Of The Function My_Error_Handler


Recommended Posts

Hi Larry cc all,

I totally understand how to create the self-defined error handling function, i.e., my_error_handler, and  what the error-reporting levels mean as indicated in table 8.1. However, the question that i am still concerning (and it's still vague) about the five arguments such as $e_num ber, $e_ message, $e_file, $e_line, and $e_vars in the function.

So,Where do the values come from that these variables can get to give report to email when errors may occur (as I don't see any of them have been created or defined as an variable normally should be before these arguments/ variables are named and added to the function)? in order words, what is the possible debugging information they can get to add to the $message? or is it set as/by default in PHP programming language?

Thanks and regards,

Link to comment
Share on other sites

Sorry for the confusion. First, as with any function's arguments, the names can be whatever you want. As for why you have those five arguments, and in that order, PHP will provide those five values automatically when an error occurs. The specific values will depend upon the actual error that occurred. 

 

Let me know if that's still not sufficiently clear.

Link to comment
Share on other sites

 Share

×
×
  • Create New...