DOMDocument::createProcessingInstruction
PHP Manual
PHP Manual»DOMDocument»DOMDocument::createProcessingInstruction

DOMDocument::createProcessingInstruction

(PHP 5, PHP 7, PHP 8)

DOMDocument::createProcessingInstructionCreates new PI node

Опис

public function 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.

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

May throw a DOMException with the following error codes:

DOM_INVALID_CHARACTER_ERR

Raised if target contains an invalid character.

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

To Top