Bug #4587 Updated: Would like exit and die to return an int
| From: | jan@php.net | Date: | Sun, 06 Jan 2002 13:30:40 +0000 |
| Subject: | Bug #4587 Updated: Would like exit and die to return an int | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-76038@lists.php.net to get a copy of this message | ||
ID: 4587
Updated by: jan
Reported By: jeff_schnitter@peoplesoft.com
Old Status: Open
Status: Closed
Bug Type: Feature/Change Request
Operating System: all
PHP Version: 4.04
New Comment:
fixed in CVS. closing.
Previous Comments:
------------------------------------------------------------------------
[2001-03-02 12:47:33] jeff_schnitter@peoplesoft.com
Any update on this request? Is there an existing way in the language
that I can force a non-zero return code to be passed back to the OS?
------------------------------------------------------------------------
[2000-05-24 21:10:44] jeff_schnitter@peoplesoft.com
I think PHP is awesome. I am a build engineer and am going to replace
all of my shell scripts and perl scripts with PHP. One thing that is
currently hurting me is that exit and die do not return a value.
If I have a makefile with a target, and I run a PHP script to build that
target, I want the PHP script to return a value. That way, make will
behave properly.
all: target1 target2
target1:
php -q -f script1.php
target2:
php -q -f script2.php
If script1.php does not execute successfully, I do not want script2.php
to run.
This problem isn't limited to make. If I have stand alone scripts that
are called from other external programs, it is extremely important to be
able to pass back a return code.
If it causes too much of a problem to change the signature of the exit
and die functions, I'd be perfectly happy if there was a new function
that did exit with a return code,
ie
int exit_rc(int value)
Thanks for your consideration and thanks for a great language!
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=4587&edit=1