final class Heap implements Countable, IteratorAggregate, JsonSerializable (View source)

Constants

MIN_CAPACITY

Methods

__construct(iterable $values = [], callable|null $comparator = null)

No description

void
clear()

No description

copy()

No description

int<0, max>
count()

Count elements of an object

TValue>|TValue[]
getIterator()

No description

bool
isEmpty()

No description

mixed
jsonSerialize()

No description

TValue
peek()

No description

TValue
pop()

No description

void
push(TValue ...$values)

No description

array
toArray()

No description

array
__serialize()

No description

void
__unserialize(array $data)

No description

Details

__construct(iterable $values = [], callable|null $comparator = null)

No description

Parameters

iterable $values
callable|null $comparator

void clear()

No description

Return Value

void

Heap copy()

No description

Return Value

Heap

int<0, max> count()

Count elements of an object

Return Value

int<0, max>

The custom count as an integer.

The return value is cast to an integer.

TValue>|TValue[] getIterator()

No description

Return Value

TValue>|TValue[]

An instance of an object implementing Iterator or Traversable

bool isEmpty()

No description

Return Value

bool

mixed jsonSerialize()

No description

Return Value

mixed

data which can be serialized by json_encode, which is a value of any type other than a resource.

TValue peek()

No description

Return Value

TValue

TValue pop()

No description

Return Value

TValue

void push(TValue ...$values)

No description

Parameters

TValue ...$values

Return Value

void

array toArray()

No description

Return Value

array

array __serialize()

No description

Return Value

array

void __unserialize(array $data)

No description

Parameters

array $data

Return Value

void