--TEST-- Handling fragments of multiple nodes for DOMParentNode --EXTENSIONS-- dom --FILE-- loadXML(''); $container = $dom->documentElement->firstElementChild; $fragment = $dom->createDocumentFragment(); $fragment->appendChild($dom->createElement('p', '1')); $fragment->appendChild($dom->createElement('b', '2')); $container->replaceWith($fragment); echo $dom->saveXML(); $dom->documentElement->append('foo'); echo $dom->saveXML(); $fragment = $dom->createDocumentFragment(); $fragment->appendChild($dom->createElement('p', '3')); $fragment->appendChild($dom->createElement('b', '4')); $dom->documentElement->prepend($fragment); echo $dom->saveXML(); ?> --EXPECT--

1

2

1

2foo

3

4

1

2foo