1--TEST--
2DOMDocument::save  Test basic function of save method
3--SKIPIF--
4<?php
5require_once('skipif.inc');
6?>
7--FILE--
8<?php
9$doc = new DOMDocument('1.0');
10$doc->formatOutput = true;
11
12$root = $doc->createElement('book');
13
14$root = $doc->appendChild($root);
15
16$title = $doc->createElement('title');
17$title = $root->appendChild($title);
18
19$text = $doc->createTextNode('This is the title');
20$text = $title->appendChild($text);
21
22$temp_filename = __DIR__."/DomDocument_save_basic.tmp";
23
24echo 'Wrote: ' . $doc->save($temp_filename) . ' bytes'; // Wrote: 72 bytes
25?>
26--CLEAN--
27<?php
28    $temp_filename = __DIR__."/DomDocument_save_basic.tmp";
29    unlink($temp_filename);
30?>
31--EXPECT--
32Wrote: 72 bytes
33