Re: PHP Fatal error and exit status code
| From: | Pierre-Alain Joye | Date: | Thu, 16 May 2002 10:40:21 +0000 |
| Subject: | Re: PHP Fatal error and exit status code | ||
| References: | 1 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-5428@lists.php.net to get a copy of this message | ||
On Thu, 16 May 2002 12:27:27 +0200 (CEST)
Jean-Pierre Arneodo <jparneodo@yahoo.fr> wrote:
> Hi,
>
> using php as shell script on RedHat 7.2 / PHP 4.1.2,
> when a 'PHP Fatal error' occurs
> if I test the return code, I've 0 (zero)
> I expected to have 0 on normal exit and
> 1 to 254 for errors like unix.
In general, you do not know the return code for any application. It does not exist standarts for the
return code. The only sure way is the documentation of the app.
> Is it a bug?
I don t know :). The only return code I use (and the only documented return code) is with the
"php -l myscript.php"
hth
pa