1--TEST--
2Cloning a Dom\HTMLDocument
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8$dom = Dom\HTMLDocument::createFromString("<p>foo</p>");
9
10$dom2 = clone $dom;
11var_dump($dom2->firstChild->tagName);
12var_dump($dom2->firstChild->textContent);
13
14$element = $dom2->firstChild;
15unset($dom2);
16var_dump(get_class($element->ownerDocument));
17
18?>
19--EXPECTF--
20Warning: Dom\HTMLDocument::createFromString(): tree error unexpected-token-in-initial-mode in Entity, line: 1, column: 2 in %s on line %d
21string(4) "HTML"
22string(3) "foo"
23string(16) "Dom\HTMLDocument"
24