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

SplHeap::insert

PHP function Edit on GitHub ✎

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

Inserts an element in the heap by sifting it up

Description

SplHeap::insert(mixed $value): true

Insert value in the heap.

Parameters

value

The value to insert.

Return Values

Always

Changelog

VersionDescription
8.4.0SplHeap::insert now has a tentative return of true.

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