PHP.nl

Iterator::rewind

Iterator::rewind

Rewind the Iterator to the first element

void **Iterator::rewind**

Rewinds back to the first element of the Iterator.

Opmerking: > This is the method called when starting a foreach loop. It will be executed foreach loops. firstnotafter

As foreach always calls  before starting
iteration, manually advancing the iterator position (for example via
) will be reset.

rewind``SplFileObject::seek

To iterate without rewinding the iterator, wrap it in a
.

NoRewindIterator

Any returned value is ignored.

Documentatie