SplPriorityQueue::setExtractFlags
(PHP 5 >= 5.3.0, PHP 7, PHP 8)
SplPriorityQueue::setExtractFlags — Sets the mode of extraction
Parameters
flags
Defines what is extracted by SplPriorityQueue::current(), SplPriorityQueue::top() and SplPriorityQueue::extract().
SplPriorityQueue::EXTR_DATA(0x00000001): Extract the dataSplPriorityQueue::EXTR_PRIORITY(0x00000002): Extract the prioritySplPriorityQueue::EXTR_BOTH(0x00000003): Extract an array containing both
The default mode is SplPriorityQueue::EXTR_DATA.
Return Values
Returns the flags of extraction.
See Also
- SplPriorityQueue::getExtractFlags() - Get the flags of extraction
- SplPriorityQueue::current() - Return current node pointed by the iterator
- SplPriorityQueue::top() - Peeks at the node from the top of the queue
- SplPriorityQueue::extract() - Extracts a node from top of the heap and sift up
来源:PHP Documentation Group · 作者与贡献记录 · CC BY 3.0。离线整理了版式、链接和媒体显示。
