--TEST-- Manually call __construct() - CDATA section variation --EXTENSIONS-- dom --FILE-- nodeValue); $cdata->__construct("my new value"); var_dump($cdata->nodeValue); $doc = new DOMDocument(); $doc->loadXML(<< XML); $doc->documentElement->appendChild($cdata); echo $doc->saveXML(); $cdata->__construct("my even newer value"); $doc->documentElement->appendChild($cdata); echo $doc->saveXML(); ?> --EXPECT-- string(8) "my value" string(12) "my new value"