Re: Bug #11008 Updated: exit() should return an exit status if passed, not send to stdout
| From: | Daniel Beckham | Date: | Tue, 22 May 2001 14:29:50 +0000 |
| Subject: | Re: Bug #11008 Updated: exit() should return an exit status if passed, not send to stdout | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-56278@lists.php.net to get a copy of this message | ||
Can we go ahead and change this behavior then? Is there really a reason to
echo the status to standard out?
Daniel
----- Original Message -----
From: <bbonev@php.net>
To: <php-dev@lists.php.net>
Sent: Monday, May 21, 2001 6:59 PM
Subject: [PHP-DEV] Bug #11008 Updated: exit() should return an exit status
if passed, not send to stdout
> ID: 11008
> Updated by: bbonev
> Reported By: brianm@dealnews.com
> Status: Open
> Bug Type: Feature/Change Request
> Operating system:
> PHP Version: 4.0 Latest CVS (2001-05-21)
> Assigned To:
> Comments:
>
> indeed it does both:
>
> if php; then echo yes; fi
> <? exit(0) ?>
> X-Powered-By: PHP/4.0.5
> Content-type: text/html
>
> 0yes
>
> if php; then echo yes; fi
> <? exit(1) ?>
> X-Powered-By: PHP/4.0.5
> Content-type: text/html
>
> 1
>
> i don't see a real reason for the echoed exit status though
>
> Previous Comments:
> --------------------------------------------------------------------------
-
>
> [2001-05-21 21:34:23] brianm@dealnews.com
> Working with a shell script here. I hoped that exit() would work like
perl and return the passed status as and exist status. As it stands now, it
sends it to stdout. This is unexpected.
>
> It would be much more useful if exit() could be used to enable the use of
PHP in shell scripts by returning the passed value as an exit status.
>
> --------------------------------------------------------------------------
-
>
>
>
> ATTENTION! Do NOT reply to this email!
> To reply, use the web interface found at
http://bugs.php.net/?id=11008&edit=2
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>