Почему существует различие в трактовке сущностей при использовании DomElement и DomText?
пример кода:
$text = 'this&that or this& that';
$document = new \DOMDocument;
$p1 = $document->createElement('p', $text);
// versus
$p2 = $document->createElement('p');
$p2->appendChild($document->createTextNode($text));
var_dump($p1->nodeValue); // thisthat
var_dump($p2->nodeValue); // this&that or this&that