note 31508 added to function.exit
| From: | sean@php.net | Date: | Thu, 24 Apr 2003 13:53:07 +0000 |
| Subject: | note 31508 added to function.exit | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-47029@lists.php.net to get a copy of this message | ||
Exit behaves differently in 4.2.x and 4.3.x (as partially noted in the docs):
---
[scoates@cronjobs scoates]$ php -v
4.2.2
[scoates@cronjobs scoates]$ php -q -a
Interactive mode enabled
<?php
exit(2);
[scoates@cronjobs scoates]$ echo $?
255
---
[scoates@lxdev01 scoates]$ php -v
PHP 4.3.0 (cgi), Copyright (c) 1997-2002 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2002 Zend Technologies
[scoates@lxdev01 scoates]$ php -q -a
Interactive mode enabled
<?php
exit(2);
?>
[scoates@lxdev01 scoates]$ echo $?
2
---
Was confusing us for a while.
S
--
http://www.php.net/manual/en/function.exit.php
http://master.php.net/manage/user-notes.php?action=edit+31508
http://master.php.net/manage/user-notes.php?action=delete+31508
http://master.php.net/manage/user-notes.php?action=reject+31508