Re: Error handling etc
| From: | Rasmus Lerdorf | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | Re: Error handling etc | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-13096@lists.php.net to get a copy of this message | ||
> 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.
-Rasmus