php8.5
Home/ Manual/ reference / dom/ The DOMText class

The DOMText class

The DOMText class inherits from DOMCharacterData and represents the textual content of a DOMElement or DOMAttr.

Intro

The DOMText class inherits from DOMCharacterData and represents the textual content of a DOMElement or DOMAttr.

Class synopsis

class DOMText extends DOMCharacterData { }

Properties

wholeText

Holds all the text of logically-adjacent (not separated by Element, Comment or Processing Instruction) Text nodes.

Changelog

VersionDescription
8.0.0The unimplemented method DOMText::replaceWholeText has been removed.

Domtext

In this section

Source: reference/dom/domtext.xml · from the official PHP manual (php/doc-en)