News Feed
Sections




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

PHPMaster.com:
Error Handling in PHP
November 10, 2011 @ 08:41:39

On PHPMaster.com today there's a new tutorial from Sneha Heda looking at error handling in PHP - the types of errors that can come up, how to throw your own and how to catch them appropriately.

Errors are the most common event a developer faces when programming. [...] To help reduce the number of errors in your code, and to mitigate their effects, proper error handling is essential in your web application. This article is a crash course in PHP error handling. You'll learn about PHP's built-in error reporting levels, and how to handle errors with custom error handlers and exception handling.

She starts with the different error reporting levels PHP offers, everything from the lightweight E_NOTICE out to E_ALL|E_STRICT. With this as a reference, she shows how to create a custom error handler (using set_error_handler). Also included is a look at exceptions and some of the more detailed information that comes with them - line numbers, messages, file the error was thrown from, etc.

0 comments voice your opinion now!
error handling tutorial exception custom handler reporting level


blog comments powered by Disqus

Similar Posts

HowTo Forge: Installing The PHP-MemCache Module On CentOS 5.0

WebCheatSheet.com: PHP: Dynamic Image Generation

NetTuts.com: Managing Cron Jobs with PHP

PHPFive.net: Creating a dynamic Google sitemap using the PHP5 SimpleXML extension

Gonzalo Ayuso: Dynamic routes with AngularJS and Silex


Community Events





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


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

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