class DOMNodeList implements IteratorAggregate, Countable (View source)

The DOMNodeList class

Properties

int $length

Methods

TNode|null
item(int $index)

Retrieves a node specified by index

int
count()

No description

getIterator()

No description

Details

TNode|null item(int $index)

Retrieves a node specified by index

Parameters

int $index

Index of the node into the collection. The range of valid child node indices is 0 to length - 1 inclusive.

Return Value

TNode|null

The node at the indexth position in the DOMNodeList, or null if that is not a valid index.

int count()

Since: 7.2

No description

Return Value

int

The custom count as an integer.

The return value is cast to an integer.

Traversable getIterator()

Since: 8.0

No description

Return Value

Traversable

An instance of an object implementing Iterator or Traversable