News Feed
Sections




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

PHPit.net:
How to handle those pesky errors in PHP
March 27, 2006 @ 08:12:56

Error reporting/handling can either be one of the handiest things since sliced bread, or it can be the bane of your existence. Hopefully, it's the former, but if you're still working with how to really catch the errors that your application throws, this new tutorial might interest you.

PHPit.net has this tutorial, jammed full of information and sample code to show you the steps to proper error handling in your application.

In this article I'm going to show you how to handle errors in PHP. In this article I will first take you through the basics of error handling, by catching all PHP errors with the set_error_handler() function. After that we'll have a look a new PHP 5 feature called Exceptions which can also be used to create and catch errors. At the end of the article I will show you how to trigger your own errors.

There's simple error handling, exception handling, and custom errors covered here making it a pretty comprehensive overview of the subject - and code for every step of the way.

0 comments voice your opinion now!
error handling exception custom error handling exception custom


blog comments powered by Disqus

Similar Posts

IBM developerWorks: Command-line PHP? Yes, you can!

Errumm.co.uk: My first experience in building a FaceBook Application in PHP

Sandro Groganz's Blog: Syntax Highlighting & Migrating Permalinks in WordPress

Volker Dusch's Blog: Never trust other peoples benchmarks - A recent example (exceptions)

Ilia Alshanetsky's Blog: PHP's Output Buffering


Community Events





Don't see your event here?
Let us know!


introduction community wordpress list laravel podcast code interview series install unittest framework opinion testing language threedevsandamaybe release developer configure refactor

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework