php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32930 When class extends with DOMDocument it's can't clone properly
Submitted: 2005-05-03 20:29 UTC Modified: 2005-05-04 00:58 UTC
From: pasha dot zubkov at gmail dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 5.0.4 OS: Linux 2.6.11.6-grsec
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: pasha dot zubkov at gmail dot com
New email:
PHP Version: OS:

 

 [2005-05-03 20:29 UTC] pasha dot zubkov at gmail dot com
Description:
------------
When class extends with DOMDocument it's can't clone properly

Reproduce code:
---------------
<?php

class First extends DOMDocument {
	private $_first = null;

	public function setFirst($first) {
		$this->_first = $first;
	}

}

class Second extends First {
	public function __construct() {
		$this->setFirst('test');
	}
}

$obj = new Second;
$object = clone $obj;

var_dump($obj, $object);

?>

Expected result:
----------------
Object will be identical


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-05-04 00:58 UTC] rrichards@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 13:01:29 2024 UTC