bug66502.phpt 476 B

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