Gets the namespace URI of the node based on the prefix

- « DOMNode::isSupported

- DOMNode::lookupPrefix »

- PHP Manual
- DOMNode
- Gets the namespace URI of the node based on the prefix

# DOMNode::lookupNamespaceURI

(PHP 5, PHP 7, PHP 8)

DOMNode::lookupNamespaceURI — Gets the namespace URI of the node based on the prefix

### Description

public DOMNode::lookupNamespaceURI(?string `$prefix`): ?string

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

### Parameters

`prefix`

  The prefix to look for. If this parameter is `null`, the method will return the default namespace URI, if any.

### Return Values

Returns the associated namespace URI or `null` if none is found.

### See Also

- DOMNode::lookupPrefix() - Gets the namespace prefix of the node based on the namespace URI