Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<DOMElement::hasAttributeDOMElement::insertAdjacentElement>
^DOMElementLast updated: Mon, 26 Oct 2026

DOMElement::hasAttributeNS

(PHP 5, PHP 7, PHP 8)

DOMElement::hasAttributeNS — Checks to see if attribute exists

Description

public function DOMElement::hasAttributeNS(?string $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

Returns true on success or false on failure.

See Also


<DOMElement::hasAttributeDOMElement::insertAdjacentElement>
^DOMElementLast updated: Mon, 26 Oct 2026