Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:7192 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25053 invoked by uid 1010); 19 Jan 2004 20:52:57 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 25029 invoked from network); 19 Jan 2004 20:52:57 -0000 Received: from unknown (HELO imf16aec.mail.bellsouth.net) (205.152.59.64) by pb1.pair.com with SMTP; 19 Jan 2004 20:52:57 -0000 Received: from [192.168.1.97] ([68.210.130.95]) by imf16aec.mail.bellsouth.net (InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with ESMTP id <20040119205256.HQAO1899.imf16aec.mail.bellsouth.net@[192.168.1.97]> for ; Mon, 19 Jan 2004 15:52:56 -0500 Mime-Version: 1.0 (Apple Message framework v609) Content-Transfer-Encoding: 7bit Message-ID: <74E71DB2-4AC1-11D8-ADF7-000393030CE6@bellsouth.net> Content-Type: text/plain; charset=US-ASCII; format=flowed To: PHP Development Date: Mon, 19 Jan 2004 15:52:55 -0500 X-Mailer: Apple Mail (2.609) Subject: The __clone Wars From: lingwitt@bellsouth.net (Sorry for the subject, I couldn't resist). It seems that the parent class's variables are not being copied per bit by the default implementation, so how should a superclasses __clone() method be dealt with? In other words, should it be like this: public function __clone() { $this = parent::__clone(); $this->... = $that->... } 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.