php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17733 exit() do not register exit values
Submitted: 2002-06-12 20:10 UTC Modified: 2002-08-08 09:57 UTC
From: cox at idecnet dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: CVS OS: All
Private report: No CVE-ID: None
 [2002-06-12 20:10 UTC] cox at idecnet dot com
With PHP 4.0.7 (for taking one):
# php -q
<?php exit(1); ?>
1# echo $?
1
#

With PHP 4.2.1:
# php -q
<?php exit(1); ?>
# echo $?
255
#

Previously the "problem" was the print of the exit code and now seems that it doesn't register the exit code.

Tomas V.V.Cox

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-12 20:21 UTC] cox at idecnet dot com
_sniper_ is telling me that this bug is already fixed in CVS.

Tomas V.V.Cox
 [2002-06-12 21:31 UTC] mfischer@php.net
But it doesn't work with inlince code:

$ php -r 'exit(1);'; echo $?
255
 [2002-06-13 04:38 UTC] edink@php.net
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a documentation 
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.


 [2002-08-08 09:54 UTC] adi at l33tless dot org
Hi,

this bug was set to closed (fixed in cvs) on Jun 13th.
PHP 4.2.2 was released on 22nd July, so I'm assuming
this should have been fixed in 4.2.2.
It looks like it got missed out or something.

ajs@nuyen:~| php -v                                                                                 
4.2.2
ajs@nuyen:~| php -q 'exit(0);' ; echo $?                                                            
255
ajs@nuyen:~| php -q                                                                                 
<?php
exit(0);
?>
ajs@nuyen:~| echo $?                                                                                
255
 [2002-08-08 09:57 UTC] kalowsky@php.net
No PHP 4.2.2 contained a security fix only.  CVS means CVS HEAD, which will tbe forthcoming 4.3 (or whatever it's numbered).  Still closed.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Oct 06 21:00:01 2026 UTC