Re: Question: Should exit() print out the integer exit-status?
| From: | Markus Fischer | Date: | Thu, 20 Dec 2001 07:34:17 +0000 |
| Subject: | Re: Question: Should exit() print out the integer exit-status? | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-74527@lists.php.net to get a copy of this message | ||
Actually, a good idea to keep BC. Its now just a matter if
its really worth to keep BC for exit.
On Wed, Dec 19, 2001 at 08:28:19PM +0000, php4@developersdesk.com wrote :
>
> Just a thought...
>
> -------------------------------------------------------------------
> void exit ( [mixed message[, int return_value]])
>
>
> Note: This is not a real function, but a language construct.
>
> The exit() function terminates execution of the script. Message
> must be a string or an int. If a non-null message is given it is
> printed just before exiting. If return_value is given the exit status
> of the program is set to this value. To set an exit status without
> printing anything, pass "" as message.
>
>
> exit(); end program, print nothing, return 0
>
> exit( "message" ); end program, print message, return 0
>
> exit( 5 ); end program, print 5, return 0
>
> exit( "messge", 5 ); end program, print message, return 5
>
> exit( 6, 5 ); end program, print 6, return 5
>
> exit( "", 5 ); end program, print nothing, return 5
>
> NOTE: The last example does not print _anything_. No <BR>'s no \n's...
> nothing.
>
> -------------------------------------------------------------------
>
> That should preserve BC and let those of us who are using php for shell
> scripting to have a reasonably simple way to return program status with
> or without printing message.
>
>
>
> Rick
>
>
> Rick Widmer
> Internet Marketing Specialists
> http://www.developersdesk.com
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
Please always Cc to me when replying to me on the lists.