mirror of
https://github.com/php/php-src.git
synced 2026-04-20 14:31:06 +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
27 lines
676 B
PHP
27 lines
676 B
PHP
--TEST--
|
|
Bug #54382 DOMNode::getAttributeNodeNS doesn't get xmlns* attributes
|
|
--EXTENSIONS--
|
|
dom
|
|
--FILE--
|
|
<?php
|
|
$xmlString = '<?xml version="1.0" encoding="utf-8" ?>
|
|
<root xmlns="http://ns" xmlns:ns2="http://ns2">
|
|
<ns2:child />
|
|
</root>';
|
|
|
|
$xml=new DOMDocument();
|
|
$xml->loadXML($xmlString);
|
|
$de = $xml->documentElement;
|
|
|
|
$ns2 = $de->getAttributeNodeNS("http://www.w3.org/2000/xmlns/", "ns2");
|
|
if ($ns2 == NULL) {
|
|
echo 'namespace node does not exist.' . "\n";
|
|
} else {
|
|
echo 'namespace node prefix=' . $ns2->prefix . "\n";
|
|
echo 'namespace node namespaceURI=' . $ns2->namespaceURI . "\n";
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
namespace node prefix=ns2
|
|
namespace node namespaceURI=http://ns2
|