Re: __clone() implementation
| From: | Adam Bregenzer | Date: | Mon, 02 Feb 2004 18:26:04 +0000 |
| Subject: | Re: __clone() implementation | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-7480@lists.php.net to get a copy of this message | ||
On Mon, 2004-02-02 at 13:18, Stephane Drouard wrote:
> Another idea for case 1 could be to be able to call parent::__clone
> even if the class does not implement it and have the bit for bit copy
> (but just for the base class).
I also think a default __clone method that does a bit for bit copy would
be a good thing. What if I do $copy = clone $some_obj; when $some_obj's
class and all its parent classes do not implement __clone? This could
be important if someone were to write proper php5 code that used classes
written for php4.
--
Adam Bregenzer
adam@bregenzer.net