Re: PHP 4.0 Bug #5272: No Class Deconstructor

From: Date: Thu, 29 Jun 2000 09:48:08 +0000
Subject: Re: PHP 4.0 Bug #5272: No Class Deconstructor
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-22727@lists.php.net to get a copy of this message
DB>> I would love this too. I'm currently having to use a global DB>> register_shutdown_function() hack to call destructors for all of DB>> my classes. DB>> DB>> Is there an engine reason why php4 classes do no have destructors? Yes. The same reason as why Java destructors are almost useless. You never know when this destructor is called (if at all) and what happens at that moment outside. If so, you could as well take any function, call it destructor and call it manually - because that's the only way you get well-defined behaviour. -- Stanislav Malyshev stas@zend.com +972-3-6139665

« previous php.dev (#22727) next »