mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +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
30 lines
663 B
PHP
30 lines
663 B
PHP
--TEST--
|
|
DOMDocument::save Test basic function of save method
|
|
--EXTENSIONS--
|
|
dom
|
|
--FILE--
|
|
<?php
|
|
$doc = new DOMDocument('1.0');
|
|
$doc->formatOutput = true;
|
|
|
|
$root = $doc->createElement('book');
|
|
|
|
$root = $doc->appendChild($root);
|
|
|
|
$title = $doc->createElement('title');
|
|
$title = $root->appendChild($title);
|
|
|
|
$text = $doc->createTextNode('This is the title');
|
|
$text = $title->appendChild($text);
|
|
|
|
$temp_filename = __DIR__."/DomDocument_save_basic.tmp";
|
|
|
|
echo 'Wrote: ' . $doc->save($temp_filename) . ' bytes'; // Wrote: 72 bytes
|
|
?>
|
|
--CLEAN--
|
|
<?php
|
|
$temp_filename = __DIR__."/DomDocument_save_basic.tmp";
|
|
unlink($temp_filename);
|
|
?>
|
|
--EXPECT--
|
|
Wrote: 72 bytes
|