Re: base class

From: Date: Thu, 22 Jan 2004 15:45:45 +0000
Subject: Re: base class
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-7276@lists.php.net to get a copy of this message
Stephane Drouard wrote: > Currently it is not possible to call parent::__construct() if the class does not derived > from another one, or none of its parent implements a constructor. I agree that it should always be possible to call parent::__construct() (at least if a base class exists :-)). > __construct() > __destruct() > Empty. Agreed. If the method actually exists or is somehow magic is an implementation detail. But one should always be able to call parent::__construct/__destruct. > __clone() > Does the bit for bit copy of the object. I think this and all other 'magic' methods you mention should be empty. Right now a bit cloning is done before __clone() is called, I can live with the minimal performance penalty this might cause. Keeps things simple and calling a non-implemented parent::__ never causes any harm like this. - Chris

« previous php.internals (#7276) next »