Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Zend:
PHP 101 - Error Handling in PHP
Jan 31, 2005 @ 13:00:17

In Part 12 of their PHP 101 series, Zend the latest editon posted - Bugging Out (Absolute Beginners: error handling).

Even the best developers make mistakes sometimes. That's why most programming languages - including PHP - come with built-in capabilities to catch errors and take remedial action. This action can be as simple as displaying an error message, or as complex as sending the site administrator an email with a complete stack trace.

[...] In this edition of PHP 101, I'm going to discuss all these things, giving you a crash course in how to add error-handling to your PHP application. Keep reading - this is pretty cool stuff!

They start off with simple explainations of what PHP errors are (notices vs warnings vs fatal errors), and move quickly into error level settings and examples of what could cause each. Then, they go a little deeper, discussing the set_error_handler functionality and how it and the try/catch statements can help making debugging your code a much simpler task.

tagged:

Link:


Trending Topics: