1--TEST-- 2bug #65196 (Passing DOMDocumentFragment to DOMDocument::saveHTML() Produces invalid Markup) 3--SKIPIF-- 4<?php 5extension_loaded("dom") or die("skip need ext/dom"); 6?> 7--FILE-- 8<?php 9$dom = new DOMDocument(); 10 11$frag1 = $dom->createDocumentFragment(); 12var_dump($dom->saveHTML($frag1)); 13 14$frag2 = $dom->createDocumentFragment(); 15$div = $dom->createElement('div'); 16$div->appendChild($dom->createElement('span')); 17$frag2->appendChild($div); 18$frag2->appendChild($dom->createElement('div')); 19$frag2->appendChild($dom->createElement('div')); 20var_dump($dom->saveHTML($frag2)); 21?> 22--EXPECT-- 23string(0) "" 24string(46) "<div><span></span></div><div></div><div></div>" 25