Re: exit()
| From: | Yasuo Ohgaki | Date: | Wed, 26 Dec 2001 07:54:31 +0000 |
| Subject: | Re: exit() | ||
| References: | 1 2 3 4 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-75029@lists.php.net to get a copy of this message | ||
Alexander Wagner wrote:
Yasuo Ohgaki wrote:It may be ok. I don't have problem with this ;)Sure, but three things: a) BC changes can be made, when necessary. I don't see why breaking BC is necessary here. People actually using PHP for shell-scripts and such should be able to cope with strange look of their exit-call.exit("",0) wouldn't print anything.It works, but question is "Is this really good fix? or good change to have?" I don't expect 100% compatibility for any language if there is major version up. I suppose many people want/keep clean syntax, instead of keeping compatibility for this. There are many BC changes in many languages including PHP, aren't there?
b) Changing exit()'s behaviour would break a lot of code and would introduce those really nasty bugs that are hard to find and you end up with an annoyed customers on the phone who doesn't know what happened
because an error-message wasn't printed.Half agreed :) I doubt the compatiblity problem, since die() is exactly the same as exit(). There would be some people who would like to write a little program to search & replace exit() to die(), if this is a requirement to make exit() to return exit status code only. If there is the program, it may be ok to change exit() behavior for 4.2.0. As I mentioned in first reply for this thread, we are better to discuss how to introduce BC changes, then we should decide what we should do for exit(), IMHO. PS: Is this what is discussed in ZendEngine2 list? If this is the conclusion from the discussion, I don't have problem with exit(message, status_code) for now. Sorry Andi. I wrote too much :) -- Yasuo Ohgaki