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
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
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 i just
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
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 are
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,
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 impractical
[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 fixed.
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
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 too
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
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
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 with! A
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 last one
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.
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
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
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 got
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 been
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
was
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 proper
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 don't we have a
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 $?' in
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?
exit_with_status(), silent_exit(), quiet_exit(), etc. etc. Something
should fit
:59 AM
Subject: Re: [PHP-DEV] Question: Should exit() print out the integer exit-status?
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
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
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_compatible_dirname()' now, instead
PROTECTED]
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 out the integer
exit-status?
exit_with_status(), silent_exit
Two reasons:
one more...
(3) exit is as forbidden as goto so stop using it.
-benjamin
_
Join the worlds largest e-mail service with MSN Hotmail.
http://www.hotmail.com
--
PHP Development Mailing List http://www.php.net/
To
]; [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?
Two reasons:
one more...
(3) exit is as forbidden as goto so stop using it.
-benjamin
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...
[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?
Two reasons:
(1) It never behaved that way, and we're not in the language design phase,
but almost 4.5 years
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: Should exit() print out the integer
exit-status?
| What are you talking about
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) return with
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
Greene [EMAIL PROTECTED]
Cc: Lars Torben Wilson [EMAIL PROTECTED]; [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
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 can't
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.
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
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
the
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 Dec 2001,
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 argue,
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 long -
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
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 message[,
background information:
http://bugs.php.net/bug.php?edit=1id=11008
http://bugs.php.net/bug.php?edit=1id=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 is
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;
47 matches
Mail list logo