The SplHeap class

From Get docs
Php/docs/latest/class.splheap


The SplHeap class

Introduction

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

The SplHeap class provides the main functionalities of a Heap.

Class synopsis

abstract class SplHeap implements Iterator, Countable {

/* Methods */

public __construct()

protected compare(mixed $value1, mixed $value2): int
public count(): int
public current(): mixed
public extract(): mixed
public insert(mixed $value): bool
public isCorrupted(): bool
public isEmpty(): bool
public key(): int
public next(): void
public recoverFromCorruption(): bool
public rewind(): void
public top(): mixed
public valid(): bool

}

Table of Contents


© 1997–2020 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/class.splheap.php