<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.xml.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'function.xml-parser-free.php',
    1 => 'xml_parser_free',
    2 => 'Free an XML parser',
  ),
  'up' => 
  array (
    0 => 'ref.xml.php',
    1 => 'XML Parser Functions',
  ),
  'prev' => 
  array (
    0 => 'function.xml-parser-create-ns.php',
    1 => 'xml_parser_create_ns',
  ),
  'next' => 
  array (
    0 => 'function.xml-parser-get-option.php',
    1 => 'xml_parser_get_option',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/xml/functions/xml-parser-free.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.xml-parser-free" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">xml_parser_free</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">xml_parser_free</span> &mdash; <span class="dc-title">Free an XML parser</span></p>

 </div>

 <div id="function.xml-parser-free-refsynopsisdiv">
  <div class="warning"><strong class="warning">Warning</strong><p class="simpara">This function has been
<em>DEPRECATED</em> as of PHP 8.5.0. Relying on this function
is highly discouraged.</p></div>
 </div>

 <div class="refsect1 description" id="refsect1-function.xml-parser-free-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="attribute"><a href="class.deprecated.php">#[\Deprecated]</a> </span><br>
   <span class="methodname"><strong>xml_parser_free</strong></span>(<span class="methodparam"><span class="type"><a href="class.xmlparser.php" class="type XMLParser">XMLParser</a></span> <code class="parameter">$parser</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <blockquote class="note"><p><strong class="note">Note</strong>: 
 <p class="para">
  This function has no effect. Prior to PHP 8.0.0, this function was used to close the resource.
 </p>
</p></blockquote>

  <p class="para">
   Frees the given XML <code class="parameter">parser</code>.
  </p>
  <div class="caution"><strong class="caution">Caution</strong>
   <p class="para">
    In addition to calling <span class="function"><strong>xml_parser_free()</strong></span> when the parsing
    is finished, prior to PHP 8.0.0, it was necessary to also explicitly unset the
    reference to <code class="parameter">parser</code> to avoid memory leaks,
    if the parser resource is referenced from an object, and this object references
    that parser resource.
   </p>
  </div>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.xml-parser-free-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">parser</code></dt>
     <dd>
      <span class="simpara">
       A reference to the XML parser to free.
      </span>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.xml-parser-free-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> on success or <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> on failure.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.xml-parser-free-changelog">
  <h3 class="title">Changelog</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Description</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.5.0</td>
      <td>
       This function has been deprecated.
      </td>
     </tr>

      <tr>
 <td>8.0.0</td>
 <td>
  <code class="parameter">parser</code> expects an <span class="classname"><a href="class.xmlparser.php" class="classname">XMLParser</a></span>
  instance now; previously, a valid <code class="literal">xml</code> <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> was expected.
 </td>
</tr>

    </tbody>
   
  </table>

 </div>


</div><?php manual_footer($setup); ?>