mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +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
37 lines
840 B
PHP
37 lines
840 B
PHP
--TEST--
|
|
DOMText::appendData basic functionality test
|
|
--CREDITS--
|
|
Mike Sullivan <mike@regexia.com>
|
|
#TestFest 2008 (London)
|
|
--EXTENSIONS--
|
|
dom
|
|
--FILE--
|
|
<?php
|
|
|
|
$document = new DOMDocument;
|
|
$root = $document->createElement('root');
|
|
$document->appendChild($root);
|
|
|
|
$text = $document->createElement('text');
|
|
$root->appendChild($text);
|
|
|
|
$textnode = $document->createTextNode('');
|
|
$text->appendChild($textnode);
|
|
$textnode->appendData('data');
|
|
echo "Text Length (one append): " . $textnode->length . "\n";
|
|
|
|
$textnode->appendData('><&"');
|
|
echo "Text Length (two appends): " . $textnode->length . "\n";
|
|
|
|
echo "Text Content: " . $textnode->data . "\n";
|
|
|
|
echo "\n" . $document->saveXML();
|
|
|
|
?>
|
|
--EXPECT--
|
|
Text Length (one append): 4
|
|
Text Length (two appends): 8
|
|
Text Content: data><&"
|
|
|
|
<?xml version="1.0"?>
|
|
<root><text>data><&"</text></root>
|