Re: Re: [PEPr] +1 for System::System_Mount
| From: | Michael Wallner | Date: | Wed, 26 May 2004 18:25:12 +0000 |
| Subject: | Re: Re: [PEPr] +1 for System::System_Mount | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-29715@lists.php.net to get a copy of this message | ||
Hi Ian Eure, you wrote:
> On Wednesday 26 May 2004 05:49 am, Michael Wallner wrote:
>
>>>-) Please don't use *return* in the constructor.
>>>
>
> Fixed in my CVS.
Well then!
>>>parent::__construct($entry);
>>>
>
> It sure would, but I'm not using PHP5. How does PHP5 handle a class that has
> both an old-style constructor and a __construct function? I'm thinking:
>
> class myClass
> {
> function __construct()
> {
> ...
> }
>
> function myClass()
> {
> $this->__construct();
> }
> }
>
> Would that provide both forwards- and backwards- compatibility?
AFAIK it is compatible with PHP4 and 5, but I'd suggest
calling myClass::__construct() rather then $this->__construct().
The greatest advantage I see with __construct() is the easy
chaining of constructors, one just has to watch out for
the construction parameters.
Regards,
--
Michael - < mike(@)php.net >
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc