The Zend Developer Zone has posted a new article/tutorial from Ben Ramsey covering one of the more powerful bits of functionality that's included with PHP5 - the Standard PHP Library (SPL).

As its name implies, the goal of the Standard PHP Library-or SPL, for short-is to provide a standard library of interfaces that allows developers to take full advantage of object-oriented programming in PHP 5. [...] The functionality it provides includes, for example, the ability to define how your objects will react when iterated over with foreach, advanced array access, file and directory access, and advanced SimpleXML object handling. The largest chunk of functionality that the SPL provides comes in the form of iterators.

Ben focuses on the iterators - three different kinds: IteratorAggregate, RecursiveIterator and SeekableIterator. The SPL also comes with a few other built-in kinds of iterators he mentions as well:

ArrayIterator

DirectoryIterator

FileIterator

As a bonus, he also talks about other "goodies" the SPL has to offer like exceptions, array handling, and file/directory access.

The Zend Developer Zone has posted a new article/tutorial from Ben Ramsey covering one of the more powerful bits of functionality that's included with PHP5 - the Standard PHP Library (SPL).

As its name implies, the goal of the Standard PHP Library-or SPL, for short-is to provide a standard library of interfaces that allows developers to take full advantage of object-oriented programming in PHP 5. [...] The functionality it provides includes, for example, the ability to define how your objects will react when iterated over with foreach, advanced array access, file and directory access, and advanced SimpleXML object handling. The largest chunk of functionality that the SPL provides comes in the form of iterators.

Ben focuses on the iterators - three different kinds: IteratorAggregate, RecursiveIterator and SeekableIterator. The SPL also comes with a few other built-in kinds of iterators he mentions as well:

ArrayIterator

DirectoryIterator

FileIterator

As a bonus, he also talks about other "goodies" the SPL has to offer like exceptions, array handling, and file/directory access.

In the just released alpha versions you can find new features, such as better support for OpenID, a Database backend for OpenID authentication, a validating method for e-mail addresses, SMTP authentication support for DIGEST-MD5, CRAM-MD5, NTLM and LOGIN and encoding support for e-mail headers.

He also mentions other goodies like tree structure handling and functionality to support WebDav connections. Check out their roadmap to get a better idea of what's to come.

In the just released alpha versions you can find new features, such as better support for OpenID, a Database backend for OpenID authentication, a validating method for e-mail addresses, SMTP authentication support for DIGEST-MD5, CRAM-MD5, NTLM and LOGIN and encoding support for e-mail headers.

He also mentions other goodies like tree structure handling and functionality to support WebDav connections. Check out their roadmap to get a better idea of what's to come.