note 29847 added to function.exit
| From: | mbostrom at paragee dot com | Date: | Wed, 26 Feb 2003 18:45:49 +0000 |
| Subject: | note 29847 added to function.exit | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-44565@lists.php.net to get a copy of this message | ||
In PHP 4.3.1 (and possibly 4.3.0), running scripts from the command line works a lot better. This
is probably because 4.3.x has a whole new CLI mode.
Specifically, exit status is now returned (to the shell) as you would expect. This is a godsend for
writing embedded email processing scripts, as much email infrastructure (fetchmail, qmail, mutt,
etc.) is dependant upon correctly returned status codes, and the inability to return a status code
(as in PHP 4.2.x) is an insurmountable obstacle.
$_SERVER["argv"] is also always available in 4.3.x, I think, whereas in 4.2.x php.ini
could prevent it from being available.
(On the downside, I had to ./configure --without-mysql in order to get 4.3.1 to compile on RedHat
8.0. Otherwise there was what looked like a fatal compile warning (that I might also have been able
to ignore somehow).
The "fatal warning" FYI:
ext/mysql/libmysql/my_tempnam.o: In function `my_tempnam':
ext/mysql/libmysql/my_tempnam.c:103: the use of
tempnam' is dangerous, better use
mkstemp'
Changing the code from tempnam to mkstemp would probably not be overly complicated, but it is
non-trivial.)
--
http://www.php.net/manual/en/function.exit.php
http://master.php.net/manage/user-notes.php?action=edit+29847
http://master.php.net/manage/user-notes.php?action=delete+29847
http://master.php.net/manage/user-notes.php?action=reject+29847