The Dom\HTMLCollection class

Introduction

Represents a static set of elements. It is similar to Dom\NodeList, but restricted to Dom\Element nodes.

Class synopsis

Dom\HTMLCollection
implements IteratorAggregate Countable
/* Properties */
public readonly int $length;
/* Methods */
/* Not documented yet */

Properties

length
The number of elements.

Changelog

Version Description
8.5.0 Cloning a Dom\HTMLCollection object now fails.

Notes

Note: The DOM extension uses UTF-8 encoding when working with methods or properties. The parser methods auto-detect the encoding or allow the caller to specify an encoding.