1--TEST--
2DOMXPath::query() can return DOMNodeList with DOMNameSpaceNode items
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8$xml = <<<'XML'
9<?xml version="1.0" encoding="UTF-8"?>
10<test></test>
11XML;
12$doc = new DomDocument;
13$doc->loadXML($xml);
14$xpath = new DOMXPath($doc);
15$nodes = $xpath->query('//namespace::*');
16var_dump($nodes->item(0));
17
18?>
19--EXPECT--
20object(DOMNameSpaceNode)#4 (8) {
21  ["nodeName"]=>
22  string(9) "xmlns:xml"
23  ["nodeValue"]=>
24  string(36) "http://www.w3.org/XML/1998/namespace"
25  ["nodeType"]=>
26  int(18)
27  ["prefix"]=>
28  string(3) "xml"
29  ["localName"]=>
30  string(3) "xml"
31  ["namespaceURI"]=>
32  string(36) "http://www.w3.org/XML/1998/namespace"
33  ["ownerDocument"]=>
34  string(22) "(object value omitted)"
35  ["parentNode"]=>
36  string(22) "(object value omitted)"
37}
38