exit() / die()
| From: | Zeev Suraski | Date: | Sat, 29 Sep 2001 00:10:55 +0000 |
| Subject: | exit() / die() | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-66807@lists.php.net to get a copy of this message | ||
Guys,
Changing these is quite out of the question - they've been a core part of the language since 1997 (at least), and have lots of lines of code that rely on them. Moreover, there's no clear-cut reason to change it, especially considering it only makes sense when used in command-line mode, whereas the current behavior is useful in all SAPIs (in order to introduce such a compatibility-breaking change, we need a *good* reason).
My suggestion is:
(a) Tracing when exit() started changing exit status. If it was recent enough, revert.
(b) In the CGI SAPI, introduce a shell_exit() or terminate() (possibly find a better name), that will exit and set the specified error level.
Zeev