xref: /php-src/ext/dom/tests/modern/spec/dump_attr.inc (revision 14b6c981)
1<?php
2function dumpAttr(DOM\Attr $attr) {
3    echo "Attr: {$attr->name}\n";
4    var_dump($attr->prefix);
5    var_dump($attr->nodeName);
6    var_dump($attr->namespaceURI);
7}
8
9function dumpAttrs(DOM\Element $element) {
10    foreach ($element->attributes as $attr) {
11        dumpAttr($attr);
12    }
13}
14