PHP 4.0 Bug #4587: Would like exit and die to return an int

From: Date: Wed, 24 May 2000 19:10:44 +0000
Subject: PHP 4.0 Bug #4587: Would like exit and die to return an int
Groups: php.dev 
Request: Send a blank email to php-dev+get-19404@lists.php.net to get a copy of this message
From: jeff_schnitter@peoplesoft.com Operating system: all PHP version: 4.0 Release Candidate 2 PHP Bug Type: Feature/Change Request Bug description: Would like exit and die to return an int 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!

« previous php.dev (#19404) next »