#27334 [NEW]: clone keyword vs __clone
| From: | trancer at trancer dot nl | Date: | Fri, 20 Feb 2004 19:56:13 +0000 |
| Subject: | #27334 [NEW]: clone keyword vs __clone | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969359120@lists.php.net to get a copy of this message | ||
From: trancer at trancer dot nl
Operating system:
PHP version: Irrelevant
PHP Bug Type: Documentation problem
Bug description: clone keyword vs __clone
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 bug report at http://bugs.php.net/?id=27334&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27334&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27334&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=27334&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=27334&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=27334&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=27334&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=27334&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=27334&r=support
Expected behavior: http://bugs.php.net/fix.php?id=27334&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=27334&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=27334&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=27334&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27334&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=27334&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=27334&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=27334&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27334&r=float