(PHP 8 >= 8.4.0)
Represents an element.
This is the modern, spec-compliant equivalent of DOMElement.
A string representing the classes of the element separated by spaces.
Reflects the element ID through the "id" attribute.
First child element or null.
Last child element or null.
The number of child elements.
The previous sibling element or null.
The next sibling element or null.
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.
© 1997–2025 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/class.dom-element.php