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

$comment->__construct("Comment 1");
$comment->__construct("Comment 2");
$comment->__construct("Comment 3");
echo 'DONE', PHP_EOL;
?>
--EXPECT--
DONE