Search Results
Class synopsis ¶ class EmptyIterator implements Iterator { /* Methods */ public current (): never public key (): never
Table of Contents EmptyIterator::current — The current () method EmptyIterator::key — The key () method EmptyIterator::next — The next () method EmptyIterator ...
EmptyIterator::key (PHP 5 >= 5.1.0, PHP 7) EmptyIterator::key — The key () method Description public EmptyIterator::key ( ) : scalar This function must not be called. It throws an exception upon access. WarningThis function is currently not documented; only its argument list is available. Parameters This function has no parameters.
Class synopsis EmptyIteratorimplements Iterator { /* Methods */ public current ( void ) : mixed public key ( void ) : scalar public next ( void ) : void public rewind ( void ) : void public valid ( void ) : bool }
EmptyIterator::key (PHP 5 >= 5.1.0, PHP 7, PHP 8) EmptyIterator::key — The key () method
May 21, 2025 · The Iterator interface At the core of PHP's iteration system is the Iterator interface, which requires implementing five methods: current, key, next, rewind, and valid. These methods provide complete control over the iteration process.
Sep 24, 2015 · In PHP Manual, has a class called EmptyIterator The manual says of the EmptyIterator::rewind() method: No operation, nothing to do. And the other methods of this class throw exceptions or return...
