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