Re: [PHP-DEV] why does exit() print its argument? From: Mike Rogers (temp6453 <email protected>)
Date: 09/28/01

it's actually quite handy. If you are writing a script that calls other
scripts, you have no way of knowing if the operation failed (exit 1) or if
all is well. You don't want to keep going through your bash script if PHP
didn't create the directory and add the SQl for it or something along those
lines. It shouldn't _output_ the status, but it should set it for other
programs to pick up.

--
Mike

----- Original Message ----- From: "Jim Winstead" <jimw <email protected>> To: <php-dev <email protected>> Sent: Friday, September 28, 2001 6:27 PM Subject: Re: [PHP-DEV] why does exit() print its argument?

> On Fri, Sep 28, 2001 at 11:14:04PM +0200, Zeev Suraski wrote: > > At 22:17 28-09-01, Jason Greene wrote: > > >Why does exit still set the exit status then? > > > > Ok, apparently it does (didn't recall that it does). I'm not sure what the > > logic behind this is. > > so you can have a script that does an exit(1) and things calling that > script can know that there was some sort of error in the script > execution. > > (personally, i'd love to see exit() stop outputting the status, > leaving that for die(), but whatever. i know better than to argue for > consistency with perl. :) > > jim > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, e-mail: php-dev-unsubscribe <email protected> > For additional commands, e-mail: php-dev-help <email protected> > To contact the list administrators, e-mail: php-list-admin <email protected> > >

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>