1--TEST-- 2Document::$implementation should return the same object 3--EXTENSIONS-- 4dom 5--FILE-- 6<?php 7 8$dom = Dom\XMLDocument::createEmpty(); 9var_dump($dom->implementation === $dom->implementation); 10$implementation = $dom->implementation; 11var_dump($dom->implementation === $implementation); 12 13$dom2 = Dom\XMLDocument::createEmpty(); 14var_dump($dom2->implementation === $dom->implementation); 15 16var_dump($implementation); 17 18try { 19 clone $implementation; 20} catch (Error $e) { 21 echo $e->getMessage(), "\n"; 22} 23 24?> 25--EXPECT-- 26bool(true) 27bool(true) 28bool(false) 29object(Dom\Implementation)#2 (0) { 30} 31Trying to clone an uncloneable object of class Dom\Implementation 32