#27334 [Opn]: clone keyword vs __clone

From: Date: Thu, 22 Sep 2005 11:43:24 +0000
Subject: #27334 [Opn]: clone keyword vs __clone
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969370276@lists.php.net to get a copy of this message
ID: 27334 Updated by: sniper@php.net Reported By: trancer at trancer dot nl Status: Open -Bug Type: Website problem +Bug Type: Documentation problem PHP Version: Irrelevant New Comment: Reclassified as documentation problem, that information SHOULD be in the manual! Previous Comments: ------------------------------------------------------------------------ [2004-02-23 03:09:44] irchtml@php.net Reclassifying as a php.net website problem as the zend-engine-2.php file is under phpweb/. ------------------------------------------------------------------------ [2004-02-20 14:56:12] trancer at trancer dot nl Description: ------------ Had the following: fatal error: Cannot call __clone() method on objects - use 'clone $obj' instead. Dig some digging, stumbled upon http://www.php.net/ChangeLog-5.php mentioning the following: "Redesigned clone by adding a clone keyword (clone $obj) and copying all properties before __clone() is called. Also allows calling parent __clone function by using parent::__clone(). (Zeev, Andi)" However the document http://www.php.net/zend-engine-2.php is in conflict with this mentioning a lot about __clone() "An object copy is created by calling the object's __clone() method:" Please fix the zend-engine-2 documentation. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=27334&edit=1

« previous php.doc (#969370276) next »