reference/xml/functions/xml-parser-free.xml
52dc204a77076e1404257cf39f179882b90b5780
...
...
@@ -1,6 +1,6 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.xml-parser-free">
3
+
<refentry xml:id="function.xml-parser-free" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>xml_parser_free</refname>
6
6
<refpurpose>Free an XML parser</refpurpose>
...
...
@@ -10,11 +10,21 @@
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
12
<type>bool</type><methodname>xml_parser_free</methodname>
13
-
<methodparam><type>resource</type><parameter>parser</parameter></methodparam>
13
+
<methodparam><type>XMLParser</type><parameter>parser</parameter></methodparam>
14
14
</methodsynopsis>
15
+
&note.resource-migration-8.0-dead-function;
15
16
<para>
16
17
Frees the given XML <parameter>parser</parameter>.
17
18
</para>
19
+
<caution>
20
+
<para>
21
+
In addition to calling <function>xml_parser_free</function> when the parsing
22
+
is finished, prior to PHP 8.0.0, it was necessary to also explicitly unset the
23
+
reference to <parameter>parser</parameter> to avoid memory leaks,
24
+
if the parser resource is referenced from an object, and this object references
25
+
that parser resource.
26
+
</para>
27
+
</caution>
18
28
</refsect1>
19
29

20
30
<refsect1 role="parameters">
...
...
@@ -36,13 +46,28 @@
36
46
<refsect1 role="returnvalues">
37
47
&reftitle.returnvalues;
38
48
<para>
39
-
This function returns &false; if <parameter>parser</parameter> does not
40
-
refer to a valid parser, or else it frees the parser and returns &true;.
49
+
&return.success;
41
50
</para>
42
51
</refsect1>
43
52

44
-
</refentry>
53
+
<refsect1 role="changelog">
54
+
&reftitle.changelog;
55
+
<informaltable>
56
+
<tgroup cols="2">
57
+
<thead>
58
+
<row>
59
+
<entry>&Version;</entry>
60
+
<entry>&Description;</entry>
61
+
</row>
62
+
</thead>
63
+
<tbody>
64
+
&xml.changelog.parser-param;
65
+
</tbody>
66
+
</tgroup>
67
+
</informaltable>
68
+
</refsect1>
45
69

70
+
</refentry>
46
71
<!-- Keep this comment at the end of the file
47
72
Local variables:
48
73
mode: sgml
49
74