Re: [PHP4BETA] setting the exit code?
| From: | Tom Fishwick | Date: | Fri, 11 Feb 2000 12:06:46 +0000 |
| Subject: | Re: [PHP4BETA] setting the exit code? | ||
| References: | 1 2 3 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-10100@lists.php.net to get a copy of this message | ||
Sascha Schumann wrote:
>
> On Thu, Feb 10, 2000 at 09:45:11AM -0800, Tom Fishwick wrote:
> > Hi,
> >
> > I wouldn't normally use PHP as a shell script, but it's going to save me
> > a couple of hours of coding in perl if I can set the exit code of a PHP
> > script, :-). So... is it possible to set the exit code? In the list
> > archives in php3 someone asked this, but I couldn't find a reply.
>
> To exit with (status & 127) = 100:
>
> <?php exit 100; ?>
>
> Note that it will also print 100 to STDOUT (or STDERR).
thanks, my mistake, when it printed it to stdout I figured it wasn't
really setting it so I didn't test further. Why does it print it out
anyways?
>
> --
>
> Regards,
>
> Sascha Schumann
> Consultant
>
> ------------------------------------------------------------------------
> Part 1.2Type: application/pgp-signature