The Standard PHP Library

These planned improvements to the MySQL classes use the Standard PHP Library (SPL), a collection of classes and interfaces aimed at solving common programming problems. The SPL, new to PHP 5, is roughly comparable to the Standard Template Library in C++ or the many classes built in to the Java language. But whereas there are thousands of classes to draw upon in Java, the number available in PHP is much more modest.

We'll use the Exception class to form the basis for a MySQLException class and the SPL to adapt the MySQLResultSet class for use with a foreach loop by using the Iterator interface. Besides the classes belonging to the SPL, there are well over 100 built-in classes in PHP 5. We'll deal with some of the other built-in classes in Chapters 12, 14, 15, and 16.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.2.15