Re: [PHP4BETA] setting the exit code?

From: Date: Fri, 11 Feb 2000 14:34:54 +0000
Subject: Re: [PHP4BETA] setting the exit code?
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-10110@lists.php.net to get a copy of this message
Well, the way you phrase the question already suggests something which isn't true - the argument given to exit() isn't the exit code, and has never been advertised as such (at least not by me). It's the exit message. Put that way, it kinda makes sense for it to display the exit message upon exit, does it not? :) Remember, PHP is not C. We're not returning to the operating system, and we're not returning return codes to anything. We could, if we really wanted to, add a CGI-specific function called set_exit_code() that would set the CGI binary's return code. It has no place in SAPI, though, and definitely not in Zend. Zeev On Fri, 11 Feb 2000, Andrei Zmievski wrote: > On Fri, 11 Feb 2000, Zeev Suraski wrote: > > > > I object; This is used in a bundload of scripts, and has been the > > advertised behavior since the dawn of PHP 3.0. It's too much of a > > language-level feature to be user-selectable. > > Ok, then, perhaps you can explain why it prints a code instead of merely > exiting with it. > > -Andrei > * Why is it always Segmentation's fault? * > -- Zeev Suraski <zeev@zend.com> http://www.zend.com/

« previous php.version4 (#10110) next »