xref: /php-src/ext/dom/tests/bug38850.phpt (revision bd9f4fa6)
1--TEST--
2Bug #38850 (lookupNamespaceURI does not return default namespace)
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7$xml = <<<HERE
8<?xml version="1.0" ?>
9<foo xmlns="http://www.example.com/ns/foo" />
10HERE;
11
12$doc = new DOMDocument();
13$doc->loadXML($xml);
14
15$root = $doc->documentElement;
16
17print $root->lookupNamespaceURI(NULL);
18
19
20?>
21--EXPECT--
22http://www.example.com/ns/foo
23