Re: Error handling etc

From: Date: Thu, 25 Nov 1999 06:45:21 +0000
Subject: Re: Error handling etc
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-13101@lists.php.net to get a copy of this message
Rasmus Lerdorf <rasmus@lerdorf.on.ca> writes: > > I have noticed that you can break a running PHP execution with this > > code in the callbacks: > > > > PG(connection_status) = PHP_CONNECTION_ABORTED; > > zend_bailout(); > > > > Is there a way to break the execution without getting a callback > > though? Take for example a script that runs a loop with no output. If > > the client (browser) close the connection, how do I break the > > execution of that script? Can I, from a non-callback function, abort > > the connection in the same way as above? > > You can call zend_bailout() anytime you want. I am not sure why you think > this needs to happen in a callback. Well, you never know. Before I wrote the email I didn't even think about any other possibilities but now I realize that I can call the function when the object that's currently running is destructed etc. -- [ Below is a random fortune, which is unrelated to the above message. ] //GO.SYSIN DD *, DOODAH, DOODAH

« previous php.dev (#13101) next »