--TEST-- Test writing Element::$outerHTML on HTML documents --EXTENSIONS-- dom --FILE-- foo
', LIBXML_NOERROR); $p = $dom->body->firstChild; $p->outerHTML = ''; // intentionally unclosed
echo $dom->saveXML(), "\n";
echo $dom->saveHtml(), "\n";
$div = $dom->body->firstChild;
$div->outerHTML = "invalid\xffutf-8𐍈𐍈𐍈";
echo $dom->saveXML(), "\n";
echo $dom->saveHtml(), "\n";
$dom->body->outerHTML = ' foo
foo
foo