diff options
author | Sebastian Bergmann <sebastian@php.net> | 2004-02-03 16:56:37 +0000 |
---|---|---|
committer | Sebastian Bergmann <sebastian@php.net> | 2004-02-03 16:56:37 +0000 |
commit | e2e5c69f47ceefcb1addc670de5ad35ed6d24278 (patch) | |
tree | f2e646f1ba6c57b9d1874e9049eb698aaf8ceec7 /Zend/ZEND_CHANGES | |
parent | 75e4f43d0cc03d71e227a478b17a2b8d71953dbf (diff) | |
download | php-git-e2e5c69f47ceefcb1addc670de5ad35ed6d24278.tar.gz |
clone/__clone() related changes.
Diffstat (limited to 'Zend/ZEND_CHANGES')
-rw-r--r-- | Zend/ZEND_CHANGES | 7 |
1 files changed, 3 insertions, 4 deletions
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: <?php - $copy_of_object = $object->__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"; |