mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +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
31 lines
586 B
PHP
31 lines
586 B
PHP
--TEST--
|
|
DOMParentNode::append() with attributes
|
|
--EXTENSIONS--
|
|
dom
|
|
--FILE--
|
|
<?php
|
|
require_once("dom_test.inc");
|
|
|
|
$dom = new DOMDocument;
|
|
$dom->loadXML('<test attr-one="21"/>');
|
|
|
|
$replacement = $dom->createAttribute('attr-one');
|
|
$replacement->value ='42';
|
|
$addition = $dom->createAttribute('attr-two');
|
|
$addition->value = '23';
|
|
|
|
$element = $dom->documentElement;
|
|
|
|
try {
|
|
$element->append($replacement, $addition);
|
|
} catch (DOMException $e) {
|
|
echo $e->getMessage() . "\n";
|
|
}
|
|
|
|
echo $dom->saveXML();
|
|
?>
|
|
--EXPECT--
|
|
Hierarchy Request Error
|
|
<?xml version="1.0"?>
|
|
<test attr-one="21"/>
|