Re: [PHP] Re: Question about __destruct()
- From: stuttle@xxxxxxxxx (Stut)
- Date: Wed, 22 Oct 2008 19:29:41 +0100
On 22 Oct 2008, at 14:42, Dan Joseph wrote:
On Tue, Oct 21, 2008 at 5:14 PM, Stut <stuttle@xxxxxxxxx> wrote:I use destructors to update dirty objects in memcache. I also use them inWhen a script ends everything is released (with some small exceptions),but you have no control over what order dtors are called and you can't
thus also all references to instances of classes.
Thus AFAIK a deconstructor will always be called at the end of script
execution.
make
any assumptions about state of file handles to STDIN/STDOUT and things
like
that ... personally I find dtors run at end of script to be nigh on
useless.
my template class to optionally automagically output the footer without
needing an explicit call on each page.
Never any issues this way? They always run without a hitch?
Not had any issues to far, and it's being used on some pretty busy sites and various PHP versions and several different web servers.
-Stut
--
http://stut.net/
.
- Follow-Ups:
- Re: [PHP] Re: Question about __destruct()
- From: "Dan Joseph"
- Re: [PHP] Re: Question about __destruct()
- References:
- Question about __destruct()
- From: "Dan Joseph"
- Re: Question about __destruct()
- From: Mike van Riel
- Re: [PHP] Re: Question about __destruct()
- From: Jochem Maas
- Re: [PHP] Re: Question about __destruct()
- From: Stut
- Re: [PHP] Re: Question about __destruct()
- From: "Dan Joseph"
- Question about __destruct()
- Prev by Date: Re: [PHP] Difficulty navigating symlinks
- Next by Date: Re: [PHP] Re: Question about __destruct()
- Previous by thread: Re: [PHP] Re: Question about __destruct()
- Next by thread: Re: [PHP] Re: Question about __destruct()
- Index(es):
Relevant Pages
|