<?php
$element = new DOMText(" Summary for Test DOMText & with a nbsp char right here .");
var_dump($element->textContent);
$element->textContent = ltrim(" Summary for Test DOMText & with a nbsp char right here .");
var_dump($element->textContent);
string(63) " Summary for Test DOMText & with a nbsp char right here ."
string(61) "Summary for Test DOMText & with a nbsp char right here ."
Output for 5.6.1 - 5.6.13
string(63) " Summary for Test DOMText & with a nbsp char right here ."
string(69) "Summary for Test DOMText & with a nbsp char right here&nbsp;."
string(63) " Summary for Test DOMText & with a nbsp char right here ."
string(63) " Summary for Test DOMText & with a nbsp char right here ."
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.9
Fatal error: Cannot instantiate non-existent class: domtext in /in/lbeVg on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: domtext in /in/lbeVg on line 3