<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.info.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'function.memory-reset-peak-usage.php',
    1 => 'memory_reset_peak_usage',
    2 => 'Reset the peak memory usage',
  ),
  'up' => 
  array (
    0 => 'ref.info.php',
    1 => 'PHP 选项/信息 函数',
  ),
  'prev' => 
  array (
    0 => 'function.memory-get-usage.php',
    1 => 'memory_get_usage',
  ),
  'next' => 
  array (
    0 => 'function.php-ini-loaded-file.php',
    1 => 'php_ini_loaded_file',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/info/functions/memory-reset-peak-usage.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.memory-reset-peak-usage" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">memory_reset_peak_usage</h1>
  <p class="verinfo">(PHP 8 &gt;= 8.2.0)</p><p class="refpurpose"><span class="refname">memory_reset_peak_usage</span> &mdash; <span class="dc-title">Reset the peak memory usage</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.memory-reset-peak-usage-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>memory_reset_peak_usage</strong></span>(): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>

  <p class="para rdfs-comment">
   Resets the peak memory usage returned by the
   <span class="function"><a href="function.memory-get-peak-usage.php" class="function">memory_get_peak_usage()</a></span> function.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.memory-reset-peak-usage-parameters">
  <h3 class="title">参数</h3>
  <p class="para">此函数没有参数。</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.memory-reset-peak-usage-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   没有返回值。
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.memory-reset-peak-usage-examples">
  <h3 class="title">示例</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>示例 #1 <span class="function"><strong>memory_reset_peak_usage()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /><br />var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">memory_get_peak_usage</span><span style="color: #007700">());<br /><br /></span><span style="color: #0000BB">$a </span><span style="color: #007700">= </span><span style="color: #0000BB">str_repeat</span><span style="color: #007700">(</span><span style="color: #DD0000">"Hello"</span><span style="color: #007700">, </span><span style="color: #0000BB">424242</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">memory_get_peak_usage</span><span style="color: #007700">());<br /><br />unset(</span><span style="color: #0000BB">$a</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">memory_reset_peak_usage</span><span style="color: #007700">();<br /><br /></span><span style="color: #0000BB">$a </span><span style="color: #007700">= </span><span style="color: #0000BB">str_repeat</span><span style="color: #007700">(</span><span style="color: #DD0000">"Hello"</span><span style="color: #007700">, </span><span style="color: #0000BB">2424</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">memory_get_peak_usage</span><span style="color: #007700">());<br /><br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>以上示例的输出类似于：</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">int(422440)
int(2508672)
int(399208)</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.memory-reset-peak-usage-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.memory-get-peak-usage.php" class="function" rel="rdfs-seeAlso">memory_get_peak_usage()</a> - 返回分配给 PHP 内存的峰值</span></li>
   </ul>
  </p>
 </div>


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