DOMDocument::createEntityReference

(PHP 5, PHP 7, PHP 8)

DOMDocument::createEntityReferenceCreate new entity reference node

Опис

public DOMDocument::createEntityReference(string $name): DOMEntityReference|false

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

Параметри

name

The content of the entity reference, e.g. the entity reference minus the leading & and the trailing ; characters.

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

The new DOMEntityReference or false if an error occurred.

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

DOM_INVALID_CHARACTER_ERR

Raised if name contains an invalid character.

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