[doc-en] master: Extend Iterator::rewind note to mention NoRewindIterator (#5110)

From: Date: Fri, 30 Jan 2026 10:33:07 +0000
Subject: [doc-en] master: Extend Iterator::rewind note to mention NoRewindIterator (#5110)
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-23111@lists.php.net to get a copy of this message
Author: Louis-Arnaud (lacatoire) Committer: GitHub (web-flow) Pusher: Girgias Date: 2026-01-30T10:33:05Z Commit: https://github.com/php/doc-en/commit/7fbb16f538011636999459326a55d5f153ef2c61 Raw diff: https://github.com/php/doc-en/commit/7fbb16f538011636999459326a55d5f153ef2c61.diff Extend Iterator::rewind note to mention NoRewindIterator (#5110) Changed paths: M language/predefined/iterator/rewind.xml Diff: diff --git a/language/predefined/iterator/rewind.xml b/language/predefined/iterator/rewind.xml index b907668ca644..990db8761d41 100644 --- a/language/predefined/iterator/rewind.xml +++ b/language/predefined/iterator/rewind.xml @@ -21,6 +21,15 @@ &foreach; loop. It will <emphasis>not</emphasis> be executed <emphasis>after</emphasis> &foreach; loops. </para> + <simpara> + As &foreach; always calls <methodname>rewind</methodname> before starting + iteration, manually advancing the iterator position (for example via + <methodname>SplFileObject::seek</methodname>) will be reset. + </simpara> + <simpara> + To iterate without rewinding the iterator, wrap it in a + <classname>NoRewindIterator</classname>. + </simpara> </note> </refsect1>

« previous php.doc.cvs (#23111) next »