Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-20 Thread Vlad Krupin
Zeev Suraski wrote: [snip] > What I *really* fail to understand is the gain we get by modifying > exit()'s behavior, as opposed to adding a new function or adding a new > $silent argument. Giving a WFF to several people? Consistency with > other languages that have nothing to do with the Web

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-20 Thread Lars Torben Wilson
[EMAIL PROTECTED] writes: > On Thu, 20 Dec 2001, Zeev Suraski wrote: > > > This patch is fine with me, but as it would still print out the error > > message, I think it's not fine with some other people... > > This solves nothing IMO. The problem is that exit (5) displays '5', and > that must be

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-20 Thread Yasuo Ohgaki
Zeev Suraski wrote: > At 15:18 20/12/2001, Yasuo Ohgaki wrote: > >> Nobody should complain about BC changes if changes are notified >> early enough and there is alternative way to do the same thing. >> IMHO. (This has been done for some features such as track vars ;) > > > That's a very imprac

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-20 Thread derick
On Thu, 20 Dec 2001, Zeev Suraski wrote: > This patch is fine with me, but as it would still print out the error > message, I think it's not fine with some other people... This solves nothing IMO. The problem is that exit (5) displays '5', and that must be fixed. Derick > > At 16:29 20/12/2001

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-20 Thread Lars Torben Wilson
Zeev Suraski writes: > This patch is fine with me, but as it would still print out the error > message, I think it's not fine with some other people... Well, that'd still be doable with that optional 2nd param I mentioned. But that's someone else's fight. :) 'night > At 16:29 20/12/2001, Lar

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-20 Thread Zeev Suraski
This patch is fine with me, but as it would still print out the error message, I think it's not fine with some other people... At 16:29 20/12/2001, Lars Torben Wilson wrote: >Zeev Suraski writes: > > At 15:18 20/12/2001, Yasuo Ohgaki wrote: > > >Nobody should complain about BC changes if changes

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-20 Thread Lars Torben Wilson
Zeev Suraski writes: > At 15:18 20/12/2001, Yasuo Ohgaki wrote: > >Nobody should complain about BC changes if changes are notified > >early enough and there is alternative way to do the same thing. > >IMHO. (This has been done for some features such as track vars ;) > > That's a very impractical

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-20 Thread Zeev Suraski
At 15:18 20/12/2001, Yasuo Ohgaki wrote: >Nobody should complain about BC changes if changes are notified >early enough and there is alternative way to do the same thing. >IMHO. (This has been done for some features such as track vars ;) That's a very impractical statement in my opinion... Break

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-20 Thread derick
On Thu, 20 Dec 2001, benjamin yates wrote: > > > > No offense Benjamin, but you don't understand the conversation. This is > > about running PHP apps in consoles, mail pre-processors and as cron jobs > > where exit status is needed. The only way to get an exit status is with > > exit. > > wow

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-20 Thread benjamin yates
> No offense Benjamin, but you don't understand the conversation. This is > about running PHP apps in consoles, mail pre-processors and as cron jobs > where exit status is needed. The only way to get an exit status is with > exit. wow i just tried it... i never realized that return wasn't se

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-20 Thread Yasuo Ohgaki
Markus Fischer wrote: > Actually, a good idea to keep BC. Its now just a matter if > its really worth to keep BC for exit. I agree with Markus. However, since there are people who want strong compatibility. I think we can wait exit() to return status code, a litle more. As I posted al

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread Markus Fischer
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 +, [EMAIL PROTECTED] wrote : > > Just a thought... > > --- > void exit ( [mixed messag

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread Rasmus Lerdorf
This is what I suggested ages ago. I think this is the correct solution for this one. I don't see mass-breakage, or perhaps even any, caused by this change. The case-insensitivity stuff is completely another matter though. I see very little benefit in 1) breaking thousands of existing scri

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread php4
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

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread Lars Torben Wilson
Markus Fischer writes: > Implictely is more error prone. How so? Can you give an example? > On Wed, Dec 19, 2001 at 04:12:02PM -0800, Lars Torben Wilson wrote : > > Markus Fischer writes: > > > Why not just check the type of the parameter? No conversion > > > needed at all. If its a

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread Markus Fischer
Implictely is more error prone. On Wed, Dec 19, 2001 at 04:12:02PM -0800, Lars Torben Wilson wrote : > Markus Fischer writes: > > Why not just check the type of the parameter? No conversion > > needed at all. If its a long -> exit/no show it. If anything > > else (well, thats to

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread Markus Fischer
Yeah Jani I know. It was more targeted at Torben than the whole audience ;) On Thu, Dec 20, 2001 at 02:16:21AM +0200, Jani Taskinen wrote : > > I have said this all the time..as well as many others. > Try convince Zeev to fix his one script that breaks. > > --Jani > > > On Thu, 20 De

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread Lars Torben Wilson
Markus Fischer writes: > Why not just check the type of the parameter? No conversion > needed at all. If its a long -> exit/no show it. If anything > else (well, thats to argue, but not the point) exit and show. > It would be that easy. And, in that case, I don't care about > t

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread Jani Taskinen
I have said this all the time..as well as many others. Try convince Zeev to fix his one script that breaks. --Jani On Thu, 20 Dec 2001, Markus Fischer wrote: >Why not just check the type of the parameter? No conversion >needed at all. If its a long -> exit/no show it. If anything >

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread Markus Fischer
Why not just check the type of the parameter? No conversion needed at all. If its a long -> exit/no show it. If anything else (well, thats to argue, but not the point) exit and show. It would be that easy. And, in that case, I don't care about the number of broken scripts. Prov

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread Lars Torben Wilson
Vlad Krupin writes: > Please, understand me correctly - I have nothing against exit() working > in the same manner regardless of the type of the argument. I would love > to see that. The problem is that (1) it already accepts a string, and > has been working that way for a long time, so this ca

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread Zeev Suraski
t;[EMAIL PROTECTED]>; "Jani Taskinen" <[EMAIL PROTECTED]>; "PHP >Developers Mailing List" <[EMAIL PROTECTED]> >Sent: Wednesday, December 19, 2001 2:26 PM >Subject: Re: [PHP-DEV] Question: Should exit() print out the integer >exit-status? > > > >

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread Vlad Krupin
Please, understand me correctly - I have nothing against exit() working in the same manner regardless of the type of the argument. I would love to see that. The problem is that (1) it already accepts a string, and has been working that way for a long time, so this can't go away, and (2) there

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread Lars Torben Wilson
Vlad Krupin writes: > Lars Torben Wilson wrote: > >Perhaps I have not explained my position. I don't care whether it > >outputs the exit status as a string--as long as it sets the error code > >appropriately *as well*. By appropriately, I mean that 'exit("boo");' > >would a) print 'boo' and b) ret

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread Brian Moon
s" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, December 19, 2001 3:00 PM Subject: Re: [PHP-DEV] Question:

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread Jason Greene
<[EMAIL PROTECTED]>; "Vlad Krupin" <[EMAIL PROTECTED]>; "Jani Taskinen" <[EMAIL PROTECTED]>; "PHP Developers Mailing List" <[EMAIL PROTECTED]> Sent: Wednesday, December 19, 2001 2:26 PM Subject: Re: [PHP-DEV] Question: Should exit() print out the

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread benjamin yates
>What are you talking about? >1) Setting the exit status of a process is common. >2) Try and right any kind of executer/parser that performs well without >goto's 1 - u can return a value just fine (and silently :) with return, and having multiple exit points i've always thought was bad design

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread Jason Greene
[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, December 19, 2001 2:45 PM Subject: Re: [PHP-DEV] Question: Should exit() print out the integer exit-status? > >Tw

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread benjamin yates
>Two reasons: one more... (3) exit is as forbidden as goto so stop using it. -benjamin _ Join the world’s largest e-mail service with MSN Hotmail. http://www.hotmail.com -- PHP Development Mailing List T

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread Zeev Suraski
eev Suraski" <[EMAIL PROTECTED]> >To: "Lars Torben Wilson" <[EMAIL PROTECTED]> >Cc: <[EMAIL PROTECTED]>; "Vlad Krupin" <[EMAIL PROTECTED]>; "Jani Taskinen" ><[EMAIL PROTECTED]>; "PHP Developers Mailing List" ><

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread Vlad Krupin
Lars Torben Wilson wrote: >Zeev Suraski writes: > >>At 15:15 19/12/2001, Lars Torben Wilson wrote: >> >>>Zeev Suraski writes: >>> exit_with_status(), silent_exit(), quiet_exit(), etc. etc. Something should fit :) >>>Yeah, you could do that. But then, why don't we have a >>>'c_compat

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread Vlad Krupin
it's kinda lame to create a yet another function when exit() already exists. After a while you have die(), exit(), exit_with_status(), silent_exit(), loud_exit(), etc. Maybe not *that* bad, but still exit is just as simple as... well, an exit. Unfortunately, it seems like there will be tons of

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread Jani Taskinen
Krupin" <[EMAIL PROTECTED]>; "Jani Taskinen" <[EMAIL PROTECTED]>; >"PHP Developers Mailing List" ><[EMAIL PROTECTED]> >Sent: Wednesday, December 19, 2001 6:59 AM >Subject: Re: [PHP-DEV] Question: Should exit() print out the integer exit-status? &g

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread Jason Greene
Cc: <[EMAIL PROTECTED]>; "Vlad Krupin" <[EMAIL PROTECTED]>; "Jani Taskinen" <[EMAIL PROTECTED]>; "PHP Developers Mailing List" <[EMAIL PROTECTED]> Sent: Wednesday, December 19, 2001 6:59 AM Subject: Re: [PHP-DEV] Question: Should exit() print

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread Lars Torben Wilson
Zeev Suraski writes: > >Perhaps I have not explained my position. I don't care whether it > >outputs the exit status as a string--as long as it sets the error code > >appropriately *as well*. > > AFAIR, this is the way it works now... > > Zeev If that were the case I would expect the last 'echo

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread Zeev Suraski
At 16:11 19/12/2001, Lars Torben Wilson wrote: >Zeev Suraski writes: > > At 15:15 19/12/2001, Lars Torben Wilson wrote: > > >Zeev Suraski writes: > > > > exit_with_status(), silent_exit(), quiet_exit(), etc. etc. Something > > > > should fit :) > > > > > >Yeah, you could do that. But then, why do

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread Lars Torben Wilson
Zeev Suraski writes: > At 15:15 19/12/2001, Lars Torben Wilson wrote: > >Zeev Suraski writes: > > > exit_with_status(), silent_exit(), quiet_exit(), etc. etc. Something > > > should fit :) > > > >Yeah, you could do that. But then, why don't we have a > >'c_compatible_dirname()' now, instead of a

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread Zeev Suraski
At 15:21 19/12/2001, Lars Torben Wilson wrote: >Zeev Suraski writes: > > Even if you repeat it may times, it still wouldn't be a bug. When I wrote > > exit() I intended exit() to print out its argument, regardless of its > > type. It's been behaving like this since PHP 3.0.0 alpha 1, because it

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread Zeev Suraski
At 15:15 19/12/2001, Lars Torben Wilson wrote: >Zeev Suraski writes: > > exit_with_status(), silent_exit(), quiet_exit(), etc. etc. Something > > should fit :) > >Yeah, you could do that. But then, why don't we have a >'c_compatible_dirname()' now, instead of a proper dirname() patch >which has b

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread Lars Torben Wilson
Zeev Suraski writes: > Even if you repeat it may times, it still wouldn't be a bug. When I wrote > exit() I intended exit() to print out its argument, regardless of its > type. It's been behaving like this since PHP 3.0.0 alpha 1, because it was > supposed to behave like that. > The doc team

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread Lars Torben Wilson
Zeev Suraski writes: > exit_with_status(), silent_exit(), quiet_exit(), etc. etc. Something > should fit :) Yeah, you could do that. But then, why don't we have a 'c_compatible_dirname()' now, instead of a proper dirname() patch which has been proven to break BC? Because the new version is Corr

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread Zeev Suraski
Even if you repeat it may times, it still wouldn't be a bug. When I wrote exit() I intended exit() to print out its argument, regardless of its type. It's been behaving like this since PHP 3.0.0 alpha 1, because it was supposed to behave like that. The doc team got it wrong, and misdocumented

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread Jani Taskinen
Fixing a bug by adding new function that behaves correctly is really not the way to go. Could you please give me nice example what kind of scripts break if the integer is not printed out? --Jani On Wed, 19 Dec 2001, Zeev Suraski wrote: >exit_with_status(), silent_exit(), quiet_exit(), etc. e

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread Zeev Suraski
exit_with_status(), silent_exit(), quiet_exit(), etc. etc. Something should fit :) At 14:49 19/12/2001, Lars Torben Wilson wrote: >Zeev Suraski writes: > > At 14:04 19/12/2001, [EMAIL PROTECTED] wrote: > > >Two ways to fix it then, either update the manual, or fix exit(). I go for > > >the las

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread Lars Torben Wilson
Zeev Suraski writes: > At 14:04 19/12/2001, [EMAIL PROTECTED] wrote: > >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. > > Only the documentation was wrong to begin wi

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread Zeev Suraski
At 14:04 19/12/2001, [EMAIL PROTECTED] wrote: >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. Only the documentation was wrong to begin with! A documentation bug should

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread derick
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

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread Lars Torben Wilson
Vlad Krupin writes: > Uh? > You probably do not want to see the returned code printed anyway (unless > you are debugging and are lazy to get it in any other way). Chances are > that the codes returned by exit() won't make much sense to anyone but > the one who develops the code, and it's not to

Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-18 Thread Vlad Krupin
Uh? You probably do not want to see the returned code printed anyway (unless you are debugging and are lazy to get it in any other way). Chances are that the codes returned by exit() won't make much sense to anyone but the one who develops the code, and it's not too difficult to do: echo 1; exi

[PHP-DEV] Question: Should exit() print out the integer exit-status?

2001-12-18 Thread Jani Taskinen
background information: http://bugs.php.net/bug.php?edit=1&id=11008 http://bugs.php.net/bug.php?edit=1&id=14574 exit() function is broken. Fixing the broken behaviour is the only real solution, IMO. One solution: - When passed argument is string: print out this string - When passed argument i