1--TEST-- 2Dom\Node::appendChild() invalid parent 3--EXTENSIONS-- 4dom 5--FILE-- 6<?php 7 8$dom = Dom\XMLDocument::createEmpty(); 9 10$text = $dom->createTextNode('Hello World'); 11$cdata = $dom->createCDATASection('Hello World'); 12$pi = $dom->createProcessingInstruction('Hello', ''); 13$attr = $dom->createAttribute('Hello'); 14 15try { 16 $text->appendChild($dom->createElement('br')); 17} catch (DOMException $e) { 18 echo $e->getMessage(), "\n"; 19} 20 21try { 22 $cdata->appendChild($dom->createElement('br')); 23} catch (DOMException $e) { 24 echo $e->getMessage(), "\n"; 25} 26 27try { 28 $pi->appendChild($dom->createElement('br')); 29} catch (DOMException $e) { 30 echo $e->getMessage(), "\n"; 31} 32 33try { 34 $attr->appendChild($dom->createElement('br')); 35} catch (DOMException $e) { 36 echo $e->getMessage(), "\n"; 37} 38 39?> 40--EXPECT-- 41Hierarchy Request Error 42Hierarchy Request Error 43Hierarchy Request Error 44Hierarchy Request Error 45