xref: /php-src/ext/dom/tests/bug78577.phpt (revision d04f48b6)
1--TEST--
2Bug #78577 (Crash in DOMNameSpace debug info handlers)
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8$doc = new DOMDocument;
9$doc->loadXML('<foo xmlns="http://php.net/test" xmlns:foo="urn:foo" />');
10
11$attr = $doc->documentElement->getAttributeNode('xmlns');
12var_dump($attr);
13
14?>
15--EXPECT--
16object(DOMNameSpaceNode)#3 (10) {
17  ["nodeName"]=>
18  string(5) "xmlns"
19  ["nodeValue"]=>
20  string(19) "http://php.net/test"
21  ["nodeType"]=>
22  int(18)
23  ["prefix"]=>
24  string(0) ""
25  ["localName"]=>
26  string(5) "xmlns"
27  ["namespaceURI"]=>
28  string(19) "http://php.net/test"
29  ["isConnected"]=>
30  bool(true)
31  ["ownerDocument"]=>
32  string(22) "(object value omitted)"
33  ["parentNode"]=>
34  string(22) "(object value omitted)"
35  ["parentElement"]=>
36  string(22) "(object value omitted)"
37}
38