1--TEST-- 2Bug #78221 (DOMNode::normalize() doesn't remove empty text nodes) 3--EXTENSIONS-- 4dom 5--FILE-- 6<?php 7$doc = new DOMDocument(); 8$doc->loadHTML('<p id=x>foo</p>'); 9$p = $doc->getElementById('x'); 10$p->childNodes[0]->textContent = ''; 11$p->normalize(); 12var_dump($p->childNodes->length); 13?> 14--EXPECT-- 15int(0) 16