DOMDocument::createProcessingInstruction

(PHP 5, PHP 7, PHP 8)

DOMDocument::createProcessingInstructionCreates new PI node

Опис

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

This function creates a new instance of class DOMProcessingInstruction. Цей вузол не відображатиметься в документі, якщо його не буде вставлено (напр.) функцією DOMNode::appendChild().

Параметри

target

The target of the processing instruction.

data

The content of the processing instruction.

Значення, що повертаються

The new DOMProcessingInstruction or false if an error occurred.

Помилки/виключення

DOM_INVALID_CHARACTER_ERR

Raised if target contains an invalid character.

Прогляньте також