From: Sebastian Bergmann Date: Tue, 3 Feb 2004 16:56:37 +0000 (+0000) Subject: clone/__clone() related changes. X-Git-Tag: php-5.0.0b4RC1~164 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e2e5c69f47ceefcb1addc670de5ad35ed6d24278;p=php clone/__clone() related changes. --- diff --git a/Zend/ZEND_CHANGES b/Zend/ZEND_CHANGES index 85c7c5203e..80d9f2c107 100644 --- a/Zend/ZEND_CHANGES +++ b/Zend/ZEND_CHANGES @@ -289,13 +289,12 @@ Changes in the Zend Engine 2.0 replicate the parent object you want to create a new instance of this other object so that the replica has its own separate copy. - An object copy is created by calling the object's __clone() - method. + An object copy is created by using the clone operator. Example: __clone(); + $copy_of_object = clone $object; ?> When the developer asks to create a new copy of an object, the @@ -333,7 +332,7 @@ Changes in the Zend Engine 2.0 print $obj->id . "\n"; - $obj = $obj->__clone(); + $obj = clone $obj; print $obj->id . "\n"; print $obj->name . "\n";