DOMDocument::createProcessingInstruction

(PHP 5, PHP 7, PHP 8)

DOMDocument::createProcessingInstructionCreates new PI node

Beschreibung

publicDOMDocument::createProcessingInstruction(string$target, string$data = ""): DOMProcessingInstruction|false

This function creates a new instance of class DOMProcessingInstruction. Dieser Knoten wird im Dokument erst dann angezeigt, wenn er mit (z. B.) DOMNode::appendChild() eingefügt wird.

Parameter-Liste

target

The target of the processing instruction.

data

The content of the processing instruction.

Rückgabewerte

The new DOMProcessingInstruction or false if an error occurred.

Fehler/Exceptions

DOM_INVALID_CHARACTER_ERR

Raised if target contains an invalid character.

Siehe auch

To Top