--TEST-- DOMDocument::saveXML(): XML_SAVE_NO_DECL --EXTENSIONS-- dom --SKIPIF-- --FILE-- loadXML('é'); echo $doc->saveXML(options: 0); echo $doc->saveXML(options: LIBXML_NOXMLDECL); // Explicit encoding test, to ensure no encoding declaration. $doc->encoding = "UTF-8"; echo $doc->saveXML(options: LIBXML_NOXMLDECL); // Edge case $doc = new DOMDocument(); var_dump($doc->saveXML(options: LIBXML_NOXMLDECL)); ?> --EXPECT-- é é é string(0) ""