The folks over at DevShed.com have yet another quality article posted today - The Standard PHP Library, Part 1.
While most of the excitement surrounding the release of PHP focused on its XML and object-oriented features, the Standard PHP Library (SPL) also saw some significant improvements that went mostly unnoticed. In the first of two articles covering the SPL, David Fells discusses the Exception class, which lets programs handle errors more gracefully and simplifies debugging.
Amid all the noise and excitement surrounding the release of PHP and its shiny new XML and object oriented features, the Standard PHP Library (SPL) slipped by without much recognition. Exception handling has been a major feature add for PHP 5, and the classes built into PHP are a part of the SPL. This article will demonstrate basic application of several SPL classes and provide information on the classes and interfaces available to PHP 5 programmers.
This first part of the series discusses the classes available to the SPL and how they can be used. First off, the Exceptions class - allowing you to catch errors and handle them gracefully and to make debugging of these errors a snap.




