bug66502.phpt 416 B

123456789101112131415161718
  1. --TEST--
  2. Bug #66502 (DOM document dangling reference)
  3. --EXTENSIONS--
  4. dom
  5. --FILE--
  6. <?php
  7. $dom = new DOMDocument('1.0', 'UTF-8');
  8. $element = $dom->appendChild(new DOMElement('root'));
  9. $comment = new DOMComment("Comment 0");
  10. $comment = $element->appendChild($comment);
  11. $comment->__construct("Comment 1");
  12. $comment->__construct("Comment 2");
  13. $comment->__construct("Comment 3");
  14. echo 'DONE', PHP_EOL;
  15. ?>
  16. --EXPECT--
  17. DONE