DOMElement::getAttributeNames
(PHP 8 >= 8.3.0)
DOMElement::getAttributeNames — Get attribute names
参数
此函数没有参数。
返回值
Return attribute names.
示例
示例 #1 DOMElement::getAttributeNames() example
<?php
$dom = new DOMDocument();
$dom->loadXML('<html xmlns:some="some:ns" some:test="a" test2="b"/>');
var_dump($dom->documentElement->getAttributeNames());
?>以上示例会输出:
array(3) {
[0]=>
string(10) "xmlns:some"
[1]=>
string(9) "some:test"
[2]=>
string(5) "test2"
}
+添加备注
用户贡献的备注
此页面尚无用户贡献的备注。
备份地址:http://www.lvesu.com/blog/php/domelement.getattributenames.php