Skip to content

Commit 57dd9ed

Browse files
committed
ext/simplexml: Document that get methods and string casts no longer implicitly rewind
1 parent 3c48a7f commit 57dd9ed

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

reference/simplexml/simplexmlelement.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,18 @@
6060
</row>
6161
</thead>
6262
<tbody>
63+
<row>
64+
<entry>8.4.0</entry>
65+
<entry>
66+
Get methods (such as
67+
<methodname>SimpleXMLElement::asXML</methodname> or
68+
<methodname>SimpleXMLElement::getName</methodname>) and casting a
69+
<classname>SimpleXMLElement</classname> to a &string; no longer
70+
implicitly rewind the iterator.
71+
The iterator must now be rewound explicitly, using
72+
<methodname>SimpleXMLElement::rewind</methodname>, where needed.
73+
</entry>
74+
</row>
6375
<row>
6476
<entry>8.0.0</entry>
6577
<entry>

reference/simplexml/simplexmlelement/rewind.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,17 @@
2222
<para>
2323
This method rewinds the <classname>SimpleXMLElement</classname> to the first element.
2424
</para>
25+
26+
<note>
27+
<simpara>
28+
As of PHP 8.4.0, calling get methods (such as
29+
<methodname>SimpleXMLElement::asXML</methodname> or
30+
<methodname>SimpleXMLElement::getName</methodname>) or casting a
31+
<classname>SimpleXMLElement</classname> to a &string; no longer
32+
implicitly rewinds the iterator. Where required, the iterator must be
33+
rewound explicitly by calling this method.
34+
</simpara>
35+
</note>
2536
</refsect1>
2637

2738
<refsect1 role="parameters">

0 commit comments

Comments
 (0)