__clone() has changed 'a bit'
| From: | Michael Wallner | Date: | Mon, 02 Feb 2004 19:45:39 +0000 |
| Subject: | __clone() has changed 'a bit' | ||
| Groups: | php.pear.qa | ||
| Request: | Send a blank email to pear-qa+get-460@lists.php.net to get a copy of this message | ||
Hi folks, just FYI:
-------- Original Message --------
Date: Mon, 02 Feb 2004 12:28:20 -0000
From: zeev@php.net (Zeev Suraski)
zeev Mon Feb 2 07:28:20 2004 EDT
Modified files:
/ZendEngine2 zend_compile.c zend_compile.h zend_language_parser.y
zend_language_scanner.l zend_objects.c
Log:
Redesign the clone() feature to fix some fundamental flaws in the previous
implementation.
Using clone directly is now done using
$replica = clone $src;
Clone methods must now be declared as follows:
function __clone($that)
{
}
Clone methods in derived classes can call the __clone method of their parent
classes using parent::__clone($that)
--
Michael - < mike(@)php.net >
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc