1--TEST--
2Manually call __construct() - comment variation
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8$comment = new DOMComment("my value");
9var_dump($comment->nodeName, $comment->nodeValue);
10$comment->__construct("my new value");
11var_dump($comment->nodeName, $comment->nodeValue);
12
13$doc = new DOMDocument();
14$doc->loadXML(<<<XML
15<?xml version="1.0"?>
16<container/>
17XML);
18$doc->documentElement->appendChild($comment);
19echo $doc->saveXML();
20
21$comment->__construct("my even newer value");
22$doc->documentElement->appendChild($comment);
23echo $doc->saveXML();
24
25?>
26--EXPECT--
27string(8) "#comment"
28string(8) "my value"
29string(8) "#comment"
30string(12) "my new value"
31<?xml version="1.0"?>
32<container><!--my new value--></container>
33<?xml version="1.0"?>
34<container><!--my new value--><!--my even newer value--></container>
35