Sophie

Sophie

distrib > Mageia > 7 > aarch64 > by-pkgid > 2b917e0437961edec048f1d15e2d7449 > files > 13185

php-manual-en-7.2.11-1.mga7.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Compare priorities in order to place elements correctly in the heap while sifting up</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="class.splpriorityqueue.html">SplPriorityQueue</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="splpriorityqueue.construct.html">SplPriorityQueue::__construct</a></div>
 <div class="up"><a href="class.splpriorityqueue.html">SplPriorityQueue</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="splpriorityqueue.compare" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">SplPriorityQueue::compare</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7)</p><p class="refpurpose"><span class="refname">SplPriorityQueue::compare</span> &mdash; <span class="dc-title">Compare priorities in order to place elements correctly in the heap while sifting up</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-splpriorityqueue.compare-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span> <span class="methodname"><strong>SplPriorityQueue::compare</strong></span>
    ( <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$priority1</code></span>
   , <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$priority2</code></span>
   )</div>


  <p class="para rdfs-comment">
   Compare <code class="parameter">priority1</code> with <code class="parameter">priority2</code>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-splpriorityqueue.compare-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>

    
     <dt>
<code class="parameter">priority1</code></dt>

     <dd>

      <p class="para">
       The priority of the first node being compared.
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">priority2</code></dt>

     <dd>

      <p class="para">
       The priority of the second node being compared.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-splpriorityqueue.compare-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Result of the comparison, positive integer if <code class="parameter">priority1</code> is greater than <code class="parameter">priority2</code>, 0 if they are equal, negative integer otherwise.
  </p>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <p class="para">
    Multiple elements with the same priority will get dequeued in no particular order.
   </p>
  </p></blockquote>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="class.splpriorityqueue.html">SplPriorityQueue</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="splpriorityqueue.construct.html">SplPriorityQueue::__construct</a></div>
 <div class="up"><a href="class.splpriorityqueue.html">SplPriorityQueue</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>