mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
a555cc0b3d
Remove most of the `===DONE===` tags and its variations. Keep `===DONE===` if the test output otherwise becomes empty. Closes GH-4872.
17 lines
482 B
PHP
17 lines
482 B
PHP
--TEST--
|
|
Bug #41947 (addChild incorrectly registers empty strings as namespaces)
|
|
--SKIPIF--
|
|
<?php if (!extension_loaded("simplexml")) print "skip"; ?>
|
|
--FILE--
|
|
<?php
|
|
$xml = simplexml_load_string('<?xml version="1.0" encoding="utf-8"?><root xmlns:myns="http://myns" />');
|
|
$grandchild = $xml->addChild('child', null, 'http://myns')->addChild('grandchild', 'hello', '');
|
|
|
|
$gchild = $xml->xpath("//grandchild");
|
|
if (count($gchild) > 0) {
|
|
echo $gchild[0]."\n";
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
hello
|