(PHP 5, PHP 7, PHP 8)
DOMDocument::createAttribute — Create new attribute
This function creates a new instance of class DOMAttr. Цей вузол не відображатиметься в документі, якщо його не буде вставлено (напр.) функцією DOMNode::appendChild().
localNameThe name of the attribute.
May throw a DOMException with the following error codes:
DOM_INVALID_CHARACTER_ERR
Raised if localName contains an invalid character.