The Dom\HTMLCollection class

- « Dom\EntityReference

- Dom\HTMLDocument »

- PHP Manual
- DOM
- The Dom\HTMLCollection class

# The Dom\HTMLCollection class

(PHP 8 >= 8.4.0)

## Introduction

Represents a static set of elements.

## Class synopsis

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

## Properties

length
  The number of elements.

## 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.