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