php8.5
Home/ Manual/ spl / splheap/ SplHeap::extract

SplHeap::extract

PHP function Edit on GitHub ✎

(PHP 5 >= 5.3.0, PHP 7, PHP 8)

Extracts a node from top of the heap and sift up

Description

SplHeap::extract(): mixed

Parameters Parameters

Return Values

The value of the extracted node.

Errors/Exceptions

Throws RuntimeException when the data-structure is empty.

Source: reference/spl/splheap/extract.xml · from the official PHP manual (php/doc-en)