xref: /PHP-8.0/ext/dom/tests/bug38949.phpt (revision 26dfce7f)
1--TEST--
2Bug #38949 (Cannot get xmlns value attribute)
3--SKIPIF--
4<?php require_once('skipif.inc'); ?>
5--FILE--
6<?php
7
8$doc = new DOMDocument();
9$doc->load(__DIR__."/nsdoc.xml");
10
11$root = $doc->documentElement;
12
13echo $root->getAttribute("xmlns")."\n";
14echo $root->getAttribute("xmlns:ns2")."\n";
15
16$child = $root->firstChild->nextSibling;
17echo $child->getAttribute("xmlns")."\n";
18echo $child->getAttribute("xmlns:ns2")."\n";
19
20echo "DONE\n";
21?>
22--EXPECT--
23http://ns
24http://ns2
25
26
27DONE
28