DOMDocument::createProcessingInstruction
PHP function
Edit on GitHub ✎
(PHP 5, PHP 7, PHP 8)
Creates new PI node
Description
DOMDocument::createProcessingInstruction(string $target, string $data = ""): DOMProcessingInstruction|false
This function creates a new instance of class DOMProcessingInstruction. Inserted
Parameters
targetThe target of the processing instruction.
dataThe content of the processing instruction.
Return Values
The new DOMProcessingInstruction or false if an error occurred.
Errors/Exceptions
May throw a DOMException with the following error codes:
DOM_INVALID_CHARACTER_ERRRaised if
targetcontains an invalid character.
See Also
DOMNode::appendChildDOMDocument::createAttributeDOMDocument::createAttributeNSDOMDocument::createCDATASectionDOMDocument::createCommentDOMDocument::createDocumentFragmentDOMDocument::createElementDOMDocument::createElementNSDOMDocument::createEntityReferenceDOMDocument::createTextNode