Enhanced iterators for PHP