What are the SPL Iterators in PHP?

October 26, 2018

The iterators in the Standard PHP Library (SPL) are the following:

AppendIterator — The AppendIterator class

ArrayIterator — The ArrayIterator class

CachingIterator — The CachingIterator class

CallbackFilterIterator — The CallbackFilterIterator class

DirectoryIterator — The DirectoryIterator class

EmptyIterator — The EmptyIterator class

FilesystemIterator — The FilesystemIterator class

FilterIterator — The FilterIterator class

GlobIterator — The GlobIterator class

InfiniteIterator — The InfiniteIterator class

IteratorIterator — The IteratorIterator class

LimitIterator — The LimitIterator class

MultipleIterator — The MultipleIterator class

NoRewindIterator — The NoRewindIterator class

ParentIterator — The ParentIterator class

RecursiveArrayIterator — The RecursiveArrayIterator class

RecursiveCachingIterator — The RecursiveCachingIterator class

RecursiveCallbackFilterIterator — The RecursiveCallbackFilterIterator class

RecursiveDirectoryIterator — The RecursiveDirectoryIterator class

RecursiveFilterIterator — The RecursiveFilterIterator class

RecursiveIteratorIterator — The RecursiveIteratorIterator class

RecursiveRegexIterator — The RecursiveRegexIterator class

RecursiveTreeIterator — The RecursiveTreeIterator class

RegexIterator — The RegexIterator class