mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
bd9f4fa676
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
26 lines
702 B
PHP
26 lines
702 B
PHP
--TEST--
|
|
DOMNode::prepend() with namespace
|
|
--EXTENSIONS--
|
|
dom
|
|
--FILE--
|
|
<?php
|
|
require_once("dom_test.inc");
|
|
|
|
$doc = new DOMDocument('1.0', 'utf-8');
|
|
$doc->formatOutput = true;
|
|
|
|
$root = $doc->createElementNS('http://www.w3.org/2005/Atom', 'element');
|
|
$doc->appendChild($root);
|
|
$root->setAttributeNS('http://www.w3.org/2000/xmlns/' ,'xmlns:g', 'http://base.google.com/ns/1.0');
|
|
|
|
$item = $doc->createElementNS('http://base.google.com/ns/1.0', 'g:item_type', 'house');
|
|
$root->prepend($item);
|
|
|
|
echo $doc->saveXML(), "\n";
|
|
?>
|
|
--EXPECT--
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
<element xmlns="http://www.w3.org/2005/Atom" xmlns:g="http://base.google.com/ns/1.0">
|
|
<g:item_type>house</g:item_type>
|
|
</element>
|