mirror of
https://github.com/php/php-src.git
synced 2024-10-20 07:53:58 +00:00
1819e947f9
fix bug #38850 (lookupNamespaceURI doesn't return default namespace) add test
23 lines
395 B
PHP
23 lines
395 B
PHP
--TEST--
|
|
Bug # 38850 (lookupNamespaceURI does not return default namespace)
|
|
--SKIPIF--
|
|
<?php require_once('skipif.inc'); ?>
|
|
--FILE--
|
|
<?php
|
|
$xml = <<<HERE
|
|
<?xml version="1.0" ?>
|
|
<foo xmlns="http://www.example.com/ns/foo" />
|
|
HERE;
|
|
|
|
$doc = new DOMDocument();
|
|
$doc->loadXML($xml);
|
|
|
|
$root = $doc->documentElement;
|
|
|
|
print $root->lookupNamespaceURI(NULL);
|
|
|
|
|
|
?>
|
|
--EXPECT--
|
|
http://www.example.com/ns/foo
|