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 (10) {
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  ["isConnected"]=>
34  bool(true)
35  ["ownerDocument"]=>
36  string(22) "(object value omitted)"
37  ["parentNode"]=>
38  string(22) "(object value omitted)"
39  ["parentElement"]=>
40  string(22) "(object value omitted)"
41}
42