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