mirror of
https://github.com/php/php-src.git
synced 2026-04-19 14:01:01 +02:00
For rationale, see https://github.com/php/php-src/pull/6787 Make extension checks lowercase, add a special case for opcache that has internal name not matching .so filename. Extensions migrated in part 2: * dom * exif * fileinfo * ffi
24 lines
638 B
PHP
24 lines
638 B
PHP
--TEST--
|
|
Bug #46185 (importNode changes the namespace of an XML element).
|
|
--EXTENSIONS--
|
|
dom
|
|
--FILE--
|
|
<?php
|
|
$aDOM = new DOMDocument();
|
|
$aDOM->loadXML('<?xml version="1.0"?>
|
|
<ns1:a xmlns:ns1="urn::ns"/>');
|
|
$a= $aDOM->firstChild;
|
|
|
|
$ok = new DOMDocument();
|
|
$ok->loadXML('<?xml version="1.0"?>
|
|
<ns1:ok xmlns:ns1="urn::ns" xmlns="urn::REAL"><watch-me xmlns:default="urn::BOGUS"/></ns1:ok>');
|
|
|
|
$imported= $aDOM->importNode($ok->firstChild, true);
|
|
$a->appendChild($imported);
|
|
|
|
echo $aDOM->saveXML();
|
|
?>
|
|
--EXPECT--
|
|
<?xml version="1.0"?>
|
|
<ns1:a xmlns:ns1="urn::ns"><ns1:ok xmlns="urn::REAL"><watch-me xmlns:default="urn::BOGUS"/></ns1:ok></ns1:a>
|