php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54991 domimplementation instance is not a reference inside domdocument
Submitted: 2011-06-04 11:33 UTC Modified: 2013-12-03 09:52 UTC
From: giorgio dot liscio at email dot it Assigned:
Status: Analyzed Package: DOM XML related
PHP Version: 5.3.6 OS: any?
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: giorgio dot liscio at email dot it
New email:
PHP Version: OS:

 

 [2011-06-04 11:33 UTC] giorgio dot liscio at email dot it
Description:
------------
hi, there is a strange behavior with domimplementation and its reference inside domdocument: i can't determine if a domdocument is bound to a specific implementation, because

$implementation = new \DOMImplementation();
$doc = $implementation->createDocument();
var_dump($doc->implementation === $implementation);

// should be true, but it is false
	


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-06-04 13:00 UTC] giorgio dot liscio at email dot it
class MyImplementation extends \DOMImplementation
{
	function commonfunc()
	{
		echo "implementation";		
	}
}

$implementation = new MyImplementation();
$doc = $implementation->createDocument();
var_dump($doc->implementation === $implementation);
// raises error:
//doc->implementation->commonfunc();
 [2013-12-03 09:52 UTC] mike@php.net
-Status: Open +Status: Analyzed
 [2013-12-03 09:52 UTC] mike@php.net
.) the objects created by DOMImplementation->create* do not reference the implementation
.) dom_document_implementation_read() always creates a new DOMImplementation object
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Mon Nov 19 09:01:25 2018 UTC