--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 = ''; var_dump($dom->body->querySelector('p')); // Should be NULL because the template contents do not participate in the DOM tree echo $dom->saveXML(), "\n"; echo $dom->saveHtml(), "\n"; ?> --EXPECT--

 

 

invalid�utf-8𐍈𐍈𐍈 

invalid�utf-8𐍈𐍈𐍈 

NULL