<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.splheap.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'splheap.insert.php',
    1 => 'SplHeap::insert',
    2 => 'Inserts an element in the heap by sifting it up',
  ),
  'up' => 
  array (
    0 => 'class.splheap.php',
    1 => 'SplHeap',
  ),
  'prev' => 
  array (
    0 => 'splheap.extract.php',
    1 => 'SplHeap::extract',
  ),
  'next' => 
  array (
    0 => 'splheap.iscorrupted.php',
    1 => 'SplHeap::isCorrupted',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/spl/splheap/insert.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="splheap.insert" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">SplHeap::insert</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">SplHeap::insert</span> &mdash; <span class="dc-title">Inserts an element in the heap by sifting it up</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-splheap.insert-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>SplHeap::insert</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span>): <span class="type"><a href="language.types.singleton.php" class="type true">true</a></span></div>


  <p class="para rdfs-comment">
   Insert <code class="parameter">value</code> in the heap.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-splheap.insert-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">value</code></dt>
     <dd>
      <p class="para">
       The value to insert.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-splheap.insert-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   总是返回 <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>。
  </p>
 </div>


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

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.4.0</td>
      <td>
       <span class="methodname"><strong>SplHeap::insert()</strong></span>
       now has a tentative return of <span class="type"><a href="language.types.singleton.php" class="type true">true</a></span>.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


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