Implementing PHP Iterators – The Beginning

One of the new features that came with PHP 5 is the ability to implement Iterators. Implementing one of your objects as an iterator essentially allows you to treat it as a standard array. By default, without adding any additional code, you can enable iteration over a regular objects variable members. So, for example, if…