]> granicus.if.org Git - php/commit
Redesign the clone() feature to fix some fundamental flaws in the previous
authorZeev Suraski <zeev@php.net>
Mon, 2 Feb 2004 12:28:19 +0000 (12:28 +0000)
committerZeev Suraski <zeev@php.net>
Mon, 2 Feb 2004 12:28:19 +0000 (12:28 +0000)
commit8e30d96ad895442d77d3a7c93cd70a052a257427
treebc950bc1a461a35ebf3215f3b3159569568d8e4f
parentc7699856fc7918604943d5f10a9191fdd8f1d21b
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)
Zend/zend_compile.c
Zend/zend_compile.h
Zend/zend_language_parser.y
Zend/zend_language_scanner.l
Zend/zend_objects.c