array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'domnode.lookupprefix.php', 1 => 'DOMNode::lookupPrefix', 2 => 'Gets the namespace prefix of the node based on the namespace URI', ), 'up' => array ( 0 => 'class.domnode.php', 1 => 'DOMNode', ), 'prev' => array ( 0 => 'domnode.lookupnamespaceuri.php', 1 => 'DOMNode::lookupNamespaceURI', ), 'next' => array ( 0 => 'domnode.normalize.php', 1 => 'DOMNode::normalize', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/dom/domnode/lookupprefix.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

DOMNode::lookupPrefix

(PHP 5, PHP 7, PHP 8)

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

说明

public DOMNode::lookupPrefix(string $namespace): ?string

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

参数

namespace

The namespace URI.

返回值

The prefix of the namespace or null on error.

参见