<?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 => 'zh',
  ),
  'this' => 
  array (
    0 => 'function.xml-parser-free.php',
    1 => 'xml_parser_free',
    2 => '释放 XML 解析器',
  ),
  'up' => 
  array (
    0 => 'ref.xml.php',
    1 => 'XML 解析器函数',
  ),
  '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' => 'zh',
    '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">释放 XML 解析器</span></p>

 </div>

 <div id="function.xml-parser-free-refsynopsisdiv">
  <div class="warning"><strong class="warning">警告</strong><p class="simpara">此函数自 PHP 8.5.0
起<em>弃用</em>。强烈建议不要应用此函数。</p></div>
 </div>

 <div class="refsect1 description" id="refsect1-function.xml-parser-free-description">
  <h3 class="title">说明</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">注意</strong>: 
 <p class="para">
  此函数无效。在 PHP 8.0.0 之前，用于关闭资源。
 </p>
</p></blockquote>

  <p class="para">
   释放指定 XML <code class="parameter">parser</code>。
  </p>
  <div class="caution"><strong class="caution">警告</strong>
   <p class="para">
    除了在解析完成时调用 <span class="function"><strong>xml_parser_free()</strong></span> 之外，在 PHP 8.0.0 之前，如果 parser
    资源引用自对象，且对象引用 parser 资源，还必须明确取消对 <code class="parameter">parser</code> 的引用以避免内存泄漏。
   </p>
  </div>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.xml-parser-free-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">parser</code></dt>
     <dd>
      <span class="simpara">
       指向要释放的 XML 解析器的指针。
      </span>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.xml-parser-free-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>， 或者在失败时返回 <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>。
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.xml-parser-free-changelog">
  <h3 class="title">更新日志</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>版本</th>
      <th>说明</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.5.0</td>
      <td>
       此函数已弃用。
      </td>
     </tr>

      <tr>
 <td>8.0.0</td>
 <td>
  <code class="parameter">parser</code> 现在接受 <span class="classname"><a href="class.xmlparser.php" class="classname">XMLParser</a></span> 实例；之前接受有效的 <code class="literal">xml</code> <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>。
 </td>
</tr>

    </tbody>
   
  </table>

 </div>


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