[doc-en] master: ext/simplexml: Document that get methods and string casts no longer implicitly rewind (#5737)

From: Date: Tue, 04 Aug 2026 08:51:25 +0000
Subject: [doc-en] master: ext/simplexml: Document that get methods and string casts no longer implicitly rewind (#5737)
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-23534@lists.php.net to get a copy of this message
Author: Louis-Arnaud (lacatoire) Committer: GitHub (web-flow) Pusher: jordikroon Date: 2026-08-04T10:51:22+02:00 Commit: https://github.com/php/doc-en/commit/418ec505128707215c5c99ad4a66a88bfd84a0ff Raw diff: https://github.com/php/doc-en/commit/418ec505128707215c5c99ad4a66a88bfd84a0ff.diff ext/simplexml: Document that get methods and string casts no longer implicitly rewind (#5737) Changed paths: M reference/simplexml/simplexmlelement.xml M reference/simplexml/simplexmlelement/rewind.xml Diff: diff --git a/reference/simplexml/simplexmlelement.xml b/reference/simplexml/simplexmlelement.xml index 244271b92601..7d901c0388b2 100644 --- a/reference/simplexml/simplexmlelement.xml +++ b/reference/simplexml/simplexmlelement.xml @@ -56,6 +56,18 @@ </row> </thead> <tbody> + <row> + <entry>8.4.0</entry> + <entry> + Get methods (such as + <methodname>SimpleXMLElement::asXML</methodname> or + <methodname>SimpleXMLElement::getName</methodname>) and casting a + <classname>SimpleXMLElement</classname> to a &string; no longer + implicitly rewind the iterator. + The iterator must now be rewound explicitly, using + <methodname>SimpleXMLElement::rewind</methodname>, where needed. + </entry> + </row> <row> <entry>8.0.0</entry> <entry> diff --git a/reference/simplexml/simplexmlelement/rewind.xml b/reference/simplexml/simplexmlelement/rewind.xml index 8caf94997d8f..1a73c2710751 100644 --- a/reference/simplexml/simplexmlelement/rewind.xml +++ b/reference/simplexml/simplexmlelement/rewind.xml @@ -22,6 +22,17 @@ <para> This method rewinds the <classname>SimpleXMLElement</classname> to the first element. </para> + + <note> + <simpara> + As of PHP 8.4.0, calling get methods (such as + <methodname>SimpleXMLElement::asXML</methodname> or + <methodname>SimpleXMLElement::getName</methodname>) or casting a + <classname>SimpleXMLElement</classname> to a &string; no longer + implicitly rewinds the iterator. Where required, the iterator must be + rewound explicitly by calling this method. + </simpara> + </note> </refsect1> <refsect1 role="parameters">

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