Statement on glibc/iconv Vulnerability

DOMElement::getAttributeNames

(PHP 8 >= 8.3.0)

DOMElement::getAttributeNamesGet attribute names

Beschreibung

public DOMElement::getAttributeNames(): array

Get attribute names.

Parameter-Liste

Diese Funktion besitzt keine Parameter.

Rückgabewerte

Return attribute names.

Beispiele

Beispiel #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());
?>

Das oben gezeigte Beispiel erzeugt folgende Ausgabe:

array(3) {
 [0]=>
 string(10) "xmlns:some"
 [1]=>
 string(9) "some:test"
 [2]=>
 string(5) "test2"
}
add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top