1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
--TEST--
Serialize legacy nodes with NULL content
--EXTENSIONS--
dom
--FILE--
<?php
$dom = Dom\HTMLDocument::createEmpty();
$root = $dom->appendChild($dom->createElement('html'));
$root->appendChild($dom->importLegacyNode(new DOMText));
$root->appendChild($dom->importLegacyNode(new DOMComment));
$root->appendChild($dom->importLegacyNode(new DOMProcessingInstruction('target')));
$root->appendChild($dom->importLegacyNode(new DOMCdataSection('')));
echo $dom->saveHTML(), "\n";
echo $dom->documentElement->innerHTML, "\n";
?>
--EXPECT--
<html><!----><?target ></html>
<!----><?target >
|