Bug #18352 Updated: exit() always returns 255
| From: | alatham at flexsys-group dot com | Date: | Tue, 23 Jul 2002 10:37:32 +0000 |
| Subject: | Bug #18352 Updated: exit() always returns 255 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-14865@lists.php.net to get a copy of this message | ||
ID: 18352
Updated by: alatham@flexsys-group.com
Reported By: tom@scl.co.uk
Status: Closed
Bug Type: Scripting Engine problem
Operating System: linux 2.2.20
PHP Version: 4.2.1
New Comment:
This is still a bug in the 4.2.2 release.
Previous Comments:
------------------------------------------------------------------------
[2002-07-15 09:46:37] edink@php.net
The latest stable snapshot (4.2.2-dev) should be what you're looking
for. It only contains bugfixes since the latest release (4.2.1).
http://snaps.php.net/php4-STABLE-latest.tar.gz
------------------------------------------------------------------------
[2002-07-15 09:42:12] tom@scl.co.uk
First of all, I know that this is fixed in CVS with Zend 2, and I
assume it is fixed on CVS php without Zend 2 BUT, we need a stable
version with exit() working properly! So if someone can send a patch or
something that would be good enough.
Here's the problem
In the manual it says that if you hand exit() an integer the script
will return that value as the exit code and if you hand exit() a string
it will print the string (to stderr I think) then exit. When you exit
with a string there is no problem and the return code is 255, but when
you exit with a number the return code is still 255.
Code to demonstrate the bug:
<?php
exit(5);
?>
This used to work in a version before 4.2.1 (not too sure which) but
not it seems to have be broken for 4.2.1
Thanks
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=18352&edit=1