You are here

public function FastPriorityQueue::extract in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/zendframework/zend-stdlib/src/FastPriorityQueue.php \Zend\Stdlib\FastPriorityQueue::extract()

Extract an element in the queue according to the priority and the order of insertion

Return value

mixed

File

vendor/zendframework/zend-stdlib/src/FastPriorityQueue.php, line 110

Class

FastPriorityQueue
This is an efficient implementation of an integer priority queue in PHP

Namespace

Zend\Stdlib

Code

public function extract() {
  if (!$this
    ->valid()) {
    return false;
  }
  $value = $this
    ->current();
  $this
    ->nextAndRemove();
  return $value;
}