DOMDocument::createTextNode
PHP function
Edit on GitHub ✎
(PHP 5, PHP 7, PHP 8)
Create new text node
Description
DOMDocument::createTextNode(string $data): DOMText
This function creates a new instance of class DOMText. Inserted
Parameters
dataThe content of the text.
Return Values
The new DOMText.
Changelog
| Version | Description |
|---|---|
| 8.1.0 | In case of an error, a DomException is thrown now. Previously, false was returned. |
See Also
DOMNode::appendChildDOMDocument::createAttributeDOMDocument::createAttributeNSDOMDocument::createCDATASectionDOMDocument::createCommentDOMDocument::createDocumentFragmentDOMDocument::createElementDOMDocument::createElementNSDOMDocument::createEntityReferenceDOMDocument::createProcessingInstruction