Re: Question: Should exit() print out the integer exit-status?

From: Date: Wed, 19 Dec 2001 12:04:08 +0000
Subject: Re: Question: Should exit() print out the integer exit-status?
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-74368@lists.php.net to get a copy of this message
Hello, On Wed, 19 Dec 2001, Lars Torben Wilson wrote: > Vlad Krupin writes: > > lot of reasons), and we don't have this functionality. Hence, at least > > if parameter to exit() is an int, we should just return the error code, > > *not* print it. > > +1 From a techincal point of view I totally agree with this. But I also know that it breaks some scripts, IMO, badly coded scripts, but still. I still say +1 for this. > > Jani Taskinen wrote: > > > > >>From manual: > > > > > >"The exit() function terminates execution of the script. It prints > > >status just before exiting. If status is an integer, that value will be > > >used as exit-status." > > > > > >This can be understood in many ways. If the status is integer, > > >it is used as exit-status..but it's not clear that it's ALSO printed out > > >which is simply buggy behaviour. Two ways to fix it then, either update the manual, or fix exit(). I go for the last one then. Ppl who relied on the undocumented feature then, did simply the wrong thing. Derick

« previous php.dev (#74368) next »