Since: 8.4

class HTMLCollection implements IteratorAggregate, Countable (View source)

Properties

int $length

Methods

Element|null
item(int $index)

No description

Element|null
namedItem(string $key)

No description

int
count()

Count elements of an object

getIterator()

No description

Details

Element|null item(int $index)

No description

Parameters

int $index

Return Value

Element|null

Element|null namedItem(string $key)

No description

Parameters

string $key

Return Value

Element|null

int count()

Count elements of an object

Return Value

int

The custom count as an integer.

The return value is cast to an integer.

Traversable getIterator()

No description

Return Value

Traversable

An instance of an object implementing Iterator or Traversable