php8.5
Home/ Manual/ dom / domnode/ DOMNode::lookupPrefix

DOMNode::lookupPrefix

PHP function Edit on GitHub ✎

(PHP 5, PHP 7, PHP 8)

Gets the namespace prefix of the node based on the namespace URI

Description

DOMNode::lookupPrefix(string $namespace): string|null

Gets the namespace prefix of the node based on the namespace URI.

Parameters

namespace

The namespace URI.

Return Values

The prefix of the namespace or null on error.

See Also

  • DOMNode::lookupNamespaceUri

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