Re: [PHP4BETA] setting the exit code?
| From: | Sascha Schumann | Date: | Thu, 10 Feb 2000 16:36:10 +0000 |
| Subject: | Re: [PHP4BETA] setting the exit code? | ||
| References: | 1 2 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-10045@lists.php.net to get a copy of this message | ||
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).
--
Regards,
Sascha Schumann
Consultant
Attachment: [application/pgp-signature]
Attachment: [application/pgp-signature]