SplPriorityQueue::__construct

(PHP 5 >= 5.3.0, PHP 7) Constructs a new empty queue public SplPriorityQueue::__construct ( void ) This constructs a new empty queue. Returns: No value is returned.

SplPriorityQueue::compare

(PHP 5 >= 5.3.0, PHP 7) Compare priorities in order to place elements correctly in the heap while sifting up. public int SplPriorityQueue::compare ( mixed $priority1, mixed $priority2 ) Compare priority1 with priority2. Parameters: priority1 The priority of the first node being compared. priority2 The priority of the second node bein

SplMinHeap::compare

(PHP 5 >= 5.3.0, PHP 7) Compare elements in order to place them correctly in the heap while sifting up. protected int SplMinHeap::compare ( mixed $value1, mixed $value2 ) Compare value1 with value2. Parameters: value1 The value of the first node being compared. value2 The value of the second node being compared. R

SplMaxHeap::compare

(PHP 5 >= 5.3.0, PHP 7) Compare elements in order to place them correctly in the heap while sifting up. protected int SplMaxHeap::compare ( mixed $value1, mixed $value2 ) Compare value1 with value2. Parameters: value1 The value of the first node being compared. value2 The value of the second node being compared. R

SplHeap::valid

(PHP 5 >= 5.3.0, PHP 7) Check whether the heap contains more nodes public bool SplHeap::valid ( void ) Checks if the heap contains any more nodes. Returns: Returns TRUE if the heap contains any more nodes, FALSE otherwise.

SplHeap::top

(PHP 5 >= 5.3.0, PHP 7) Peeks at the node from the top of the heap public mixed SplHeap::top ( void ) Returns: The value of the node on the top. Exception: Throws RuntimeException when the data-structure is empty.

SplHeap::rewind

(PHP 5 >= 5.3.0, PHP 7) Rewind iterator back to the start (no-op) public void SplHeap::rewind ( void ) This rewinds the iterator to the beginning. This is a no-op for heaps as the iterator is virtual and in fact never moves from the top of the heap. Returns: No value is returned.

SplHeap::recoverFromCorruption

(PHP 5 >= 5.3.0, PHP 7) Recover from the corrupted state and allow further actions on the heap. public void SplHeap::recoverFromCorruption ( void ) Returns: No value is returned.

SplHeap::next

(PHP 5 >= 5.3.0, PHP 7) Move to the next node public void SplHeap::next ( void ) Move to the next node. This will delete the top node of the heap. Returns: No value is returned.

SplHeap::key

(PHP 5 >= 5.3.0, PHP 7) Return current node index public mixed SplHeap::key ( void ) This function returns the current node index Returns: The current node index.