Re: Re: Why isn't base class constructors or destructors required to be called? (was: Re: [PHP-DEV] Return type hints)
| From: | Terje Slettebø | Date: | Fri, 15 Sep 2006 06:48:01 +0000 |
| Subject: | Re: Re: Why isn't base class constructors or destructors required to be called? (was: Re: [PHP-DEV] Return type hints) | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-25716@lists.php.net to get a copy of this message | ||
>From: "Marcus Boerger" <helly@php.net>
> PHP is not C++ and speaking of constructors and destrcutors PHP goes
morethe
> Delphi way.
I'd also like to know _why_ constructors/destructors are less fit for PHP,
than these other languages? How can you be sure that objects of a class are
properly initialised, and that they clean up after themselves? (Yes, I know
the runtime cleans up after them, at script termination, if want to be
sloppy, but that still doesn't cover the constructor case)