SplHeap::isEmpty

(PHP 5 >= 5.3.0, PHP 7) Checks whether the heap is empty. public bool SplHeap::isEmpty ( void ) Returns: Returns whether the heap is empty.

SplHeap::insert

(PHP 5 >= 5.3.0, PHP 7) Inserts an element in the heap by sifting it up. public void SplHeap::insert ( mixed $value ) Insert value in the heap. Parameters: value The value to insert. Returns: No value is returned.

SplHeap::extract

(PHP 5 >= 5.3.0, PHP 7) Extracts a node from top of the heap and sift up. public mixed SplHeap::extract ( void ) Returns: The value of the extracted node. Exception: Throws RuntimeException when the data-structure is empty.

SplHeap::current

(PHP 5 >= 5.3.0, PHP 7) Return current node pointed by the iterator public mixed SplHeap::current ( void ) Get the current datastructure node. Returns: The current node value.

SplHeap::count

(PHP 5 >= 5.3.0, PHP 7) Counts the number of elements in the heap. public int SplHeap::count ( void ) Returns: Returns the number of elements in the heap.

SplHeap::__construct

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

SplHeap::compare

(PHP 5 >= 5.3.0, PHP 7) Compare elements in order to place them correctly in the heap while sifting up. abstract protected int SplHeap::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.

SplQueue::setIteratorMode

(PHP 5 >= 5.3.0, PHP 7) Sets the mode of iteration void SplQueue::setIteratorMode ( int $mode ) Parameters: mode There is only one iteration parameter you can modify. The behavior of the iterator (either one or the other): SplDoublyLinkedList::IT_MODE_DELETE (Elements are deleted by the iterator) SplDoublyLinkedList::IT_MODE_KEEP (Elements are traversed by the iterato

SplQueue::enqueue

(PHP 5 >= 5.3.0, PHP 7) Adds an element to the queue. void SplQueue::enqueue ( mixed $value ) Enqueues value at the end of the queue. Note: SplQueue::enqueue() is an alias of SplDoublyLinkedList::push(). Parameters: value The value to enqueue. Returns: No value is returned.

SplQueue::dequeue

(PHP 5 >= 5.3.0, PHP 7) Dequeues a node from the queue mixed SplQueue::dequeue ( void ) Dequeues value from the top of the queue. Note: SplQueue::dequeue() is an alias of SplDoublyLinkedList::shift(). Returns: The value of the dequeued node.