Date: 09/29/01
- Next message: Thies C. Arntzen: "Re: [PHP-DEV] Benedicte Bakken born"
- Previous message: Zeev Suraski: "Re: [PHP-DEV] why does exit() print its argument?"
- In reply to: Zeev Suraski: "Re: [PHP-DEV] why does exit() print its argument?"
- Next in thread: Stig Sæther Bakken: "Re: [PHP-DEV] why does exit() print its argument?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
how about return_exit()
It is returning the value, and then exiting. Seems to make sense
-- Mike----- Original Message ----- From: "Zeev Suraski" <zeev <email protected>> To: "Stig Sæther Bakken" <ssb <email protected>> Cc: <php-dev <email protected>> Sent: Saturday, September 29, 2001 9:26 AM Subject: Re: [PHP-DEV] why does exit() print its argument?
The WTF factor is generally higher with magical stuff like that. It's not too far fetched to realize a situation where a 'WTF?' will be flown into the air, just because the error message happened to be "1", or "20"...
shell_exit() is not a very good name. That's why I haven't failed to mention, every time I mentioned it, that a better name would be better. We can have exit_with_status(), silent_exit(), etc.
Zeev
At 05:53 29-09-01, Stig Sæther Bakken wrote: >WTF factor: WTF is shell_exit? Exit to shell? Does it start a shell? >:-) > > - Stig > >[Zeev Suraski <zeev <email protected>>] > > Is there any good reason not to simply add a new function? It's not > > as if it ever behaved that way. This magic tends to later fire back > > at us. > > > > Zeev > > > > At 03:17 29-09-01, Rasmus Lerdorf wrote: > > >How about if we overload it a bit. I think anybody who does exit(1) is > > >expecting 1 to be set as the return status whereas someone who does > > >exit('something bad happened') is expecting the string to be shown a-la > > >die(). So let's just check the arg and do the appropriate thing. I would > > >be very surprised if that broke anything. > > > > > >-Rasmus > > > > > >On Sat, 29 Sep 2001, Zeev Suraski wrote: > > > > > > > At 03:10 29-09-01, Jim Winstead wrote: > > > > >On Sat, Sep 29, 2001 at 02:12:51AM +0200, Zeev Suraski wrote: > > > > > > Uhm, I'm not dumb :) Of course it enables you to do that, but > > > that's the > > > > > > wrong place to put it. exit() has, since its introduction, been a > > > > > complete > > > > > > equivalent of die(), and had nothing to do with exit > statuses. Putting > > > > > > this code there was wrong (even though who knows, maybe I even > > > did that). > > > > > > > > > >no, sascha did. php3 does the same thing. > > > > > > > > Ok, looks like it's old enough (as old as mid 1999). We should > probably > > > > leave it at that and introduce a new shell_exit() function. > > > > > > > > Zeev > > > > > > > > > > > > > > > > > > -- > > 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> > >-- > Stig Sæther Bakken <ssb <email protected>> > Fast Search & Transfer ASA, Trondheim, Norway
-- 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>
- Next message: Thies C. Arntzen: "Re: [PHP-DEV] Benedicte Bakken born"
- Previous message: Zeev Suraski: "Re: [PHP-DEV] why does exit() print its argument?"
- In reply to: Zeev Suraski: "Re: [PHP-DEV] why does exit() print its argument?"
- Next in thread: Stig Sæther Bakken: "Re: [PHP-DEV] why does exit() print its argument?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

