Skip to content

Commit dca2a83

Browse files
committed
Document special handling for "&" in SimpleXml::addChild()
See the comments section for that page: https://www.php.net/manual/en/simplexmlelement.addchild.php
1 parent 462d2bc commit dca2a83

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

reference/simplexml/simplexmlelement/addChild.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@
3838
<para>
3939
If specified, the value of the child element.
4040
</para>
41+
<para>
42+
Special characters <literal>&lt;</literal> and <literal>&gt;</literal> get escaped
43+
automatically, <literal>&amp;</literal> must be escaped manually.
44+
</para>
4145
</listitem>
4246
</varlistentry>
4347
<varlistentry>

0 commit comments

Comments
 (0)