php8.5
Home/ Manual/ dom / domelement/ DOMElement::hasAttributeNS

DOMElement::hasAttributeNS

PHP function Edit on GitHub ✎

(PHP 5, PHP 7, PHP 8)

Checks to see if attribute exists

Description

DOMElement::hasAttributeNS(string|null $namespace, string $localName): bool

Indicates whether attribute in namespace namespace named localName exists as a member of the element.

Parameters

namespace

The namespace URI.

localName

The local name.

Return Values

Success

See Also

  • DOMElement::hasAttribute
  • DOMElement::getAttributeNS
  • DOMElement::setAttributeNS
  • DOMElement::removeAttributeNS

Source: reference/dom/domelement/hasattributens.xml · from the official PHP manual (php/doc-en)