array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'class.splpriorityqueue.php', 1 => 'SplPriorityQueue', ), 'up' => array ( 0 => 'spl.datastructures.php', 1 => '数据结构', ), 'prev' => array ( 0 => 'splminheap.compare.php', 1 => 'SplMinHeap::compare', ), 'next' => array ( 0 => 'splpriorityqueue.compare.php', 1 => 'SplPriorityQueue::compare', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/spl/splpriorityqueue.xml', ), 'extra_header_links' => array ( 'rel' => 'alternate', 'href' => '/manual/en/feeds/class.splpriorityqueue.atom', 'type' => 'application/atom+xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5 >= 5.3.0, PHP 7, PHP 8)
The SplPriorityQueue class provides the main functionalities of a prioritized queue, implemented using a max heap.
注意: The order of elements with identical priority is undefined. It may differ from the order in which they have been inserted.