News Feed
Sections




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

Ralph Schindler's Blog:
Exception Best Practices in PHP 5.3
September 16, 2010 @ 10:26:17

Ralph Schindler has put together a new post for his blog about some of the best practices for using exceptions in PHP 5.3 - specifically dealing with some of the new functionality that comes with this latest PHP version.

Exception handling in PHP is not a new feature by any stretch. In this article, we'll discuss two new features in PHP 5.3 based around exceptions. The first is nested exceptions and the second is a new set of exception types offered by the SPL extension (which is now a core extension of the PHP runtime). Both of these new features have found their way into the book of best best practices and deserve to be examined in detail.

Some of the features he talks about were pre-PHP 5.3, but the focus is largely on these new features. He gives a bit of a background on exception handling in PHP and how custom exceptions could be thrown. He then moves on to the new features - first nesting exceptions and then some about the new core exception types (found here). All that being said, he includes some code to show the dynamic/logic/runtime exceptions in action including a look at best practices in library exception handling.

0 comments voice your opinion now!
exception bestpractices spl types logic dynamic runtime library


blog comments powered by Disqus

Similar Posts

Matthew Weier O'Phinney's Blog: Migrating OOP Libraries and Frameworks to PHP 5.3

NETTUTS.com: Creating a Dynamic Poll with jQuery and PHP

Padraic Brady's Blog: More OpenID (in PEAR and Refactoring)

Ian Selby's Blog: Dynamically Add Functions to PHP Classes

Pierre-Alain Joye's Blog: Build cairo on windows, step #1


Community Events





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


introduction configure bugfix release laravel threedevsandamaybe podcast community library wordpress developer install list code series interview language application api unittest

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