📄 splpriorityqueue.compare.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Compare priorities in order to place elements correctly in the heap while sifting up.</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div 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">(No version information available, might be only in CVS)</p><p class="refpurpose"><span class="refname">SplPriorityQueue::compare</span> — <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"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type"><span class="type void">void</span></span> <span class="methodname"><b><b>SplPriorityQueue::compare</b></b></span> ( <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <tt class="parameter">$priority1</tt></span> , <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <tt class="parameter">$priority1</tt></span> )</div> <p class="para rdfs-comment"> Compare <i><tt class="parameter">priority1</tt></i> with <i><tt class="parameter">priority2</tt></i>. </p> </div> <div class="refsect1 parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><i><tt class="parameter">priority1</tt></i></span> <dd> <p class="para"> The priority of the first node being compared. </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">priority2</tt></i></span> <dd> <p class="para"> The priority of the second node being compared. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Result of the comparison, positive integer if <i><tt class="parameter">priority1</tt></i> is greater than <i><tt class="parameter">priority2</tt></i>, 0 if they are equal, negative integer otherwise. </p> <blockquote><p><b class="note">Note</b>: Multiple elements with the same priority will get dequeued in no particular order. <br /> </p></blockquote> </div></div><hr /><div 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>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -