Re: Cannot call constructor
| From: | Etienne Kneuss | Date: | Fri, 24 May 2013 15:26:23 +0000 |
| Subject: | Re: Cannot call constructor | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-67492@lists.php.net to get a copy of this message | ||
Sure the default implementation would have to be identical to the behavior
of not defining one.
I believe the best way to solve these issues is by having an implicit base
class. To some extent, that means BC breaks though.
On Fri, May 24, 2013 at 5:22 PM, Ferenc Kovacs <tyra3l@gmail.com> wrote:
>
> Hi.
>>
>> I'm not an expert here, so just thinking out loud ...
>>
>> If a theoretical \PHP\baseclass can have empty
>> __construct()/__destruct(), what about the other magic methods?
>>
>> OK, I suppose cascading some of the magic methods to a parent and having
>> a null parent at the very very bottom of the heap sounds useful. But I'm
>> not totally sure.
>>
>> Is there much/any need for a true base class that ALL classes will extend
>> from, including those in extensions.
>>
>
> it was discussed in the linked thread, personally I agree that those are
> different both in intention and implementation, so shouldn't affected by
> this change.
>
> ps: for example having an empty __sleep() or __wakeup implementation would
> be entirely differrent that one would expect.
>
> --
> Ferenc Kovács
> @Tyr43l - http://tyrael.hu
>
--
Etienne Kneuss
http://www.colder.ch