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
namespaceThe namespace URI.
Return Values
The prefix of the namespace or null on error.
See Also
DOMNode::lookupNamespaceUri