Re: [PHP4BETA] Re: [PHP3] OO
| From: | Stig Bakken | Date: | Mon, 09 Aug 1999 10:29:38 +0000 |
| Subject: | Re: [PHP4BETA] Re: [PHP3] OO | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-3225@lists.php.net to get a copy of this message | ||
On Tue, 3 Aug 1999, Zeev Suraski wrote:
> At 21:46 03/08/99 , Sander Pilon wrote:
> >Is, or will there be, support for the following things in php3 or php4?
> >
> >Class constructors/desctructors?
> >(I think there are constructors)
>
> There are constructors, due to the way PHP 4.0 works (reference counted
> operation) destructors don't make much sense.
You are assuming that the destructor would only free allocated resources.
If you want to do something else in a destructor, such as flushing changes
to a database, destructors are useful. It can of course be implemented in
userland, but it's not exactly something that would be taught in CS
courses :-)
- Stig