Re: The __clone Wars
| From: | George Schlossnagle | Date: | Mon, 19 Jan 2004 20:58:36 +0000 |
| Subject: | Re: The __clone Wars | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-7193@lists.php.net to get a copy of this message | ||
On Jan 19, 2004, at 3:52 PM, lingwitt@bellsouth.net wrote:
In other words, should it be like this:Yes.
P.S. Perhaps the $this object should already be set using the default implementation, and then the user could override certain properties if he so wishes; I believe the preliminary documentation says that this is the case, but it doesn't work like this.If you want the default cloning mechanism, you should just use the default clone method. If you specify your own __clone method, then you've effectively said 'I know what I am doing and how I want to do it.' Magical setting of attributes would a) be confusing b) cause twice the work to be done for any variables you don't want to be as default George