News for hackers. Stuff that matters.
Re:We will try to stop fixing bugs in PHP by piggity on Friday June 22, 2012 @12:43AM (#4145436)
I don't "really mind" if it breaks totally (i.e. throws an appropriate exception or doesn't parse the syntax check).

I find it much more irritating when the behaviour subtly changes and introduces edge cases that may not be picked up in testing / normal usage.

Re:We will try to stop fixing bugs in PHP by josegonzalez on Friday June 22, 2012 @01:00AM (#4145485)
Passing in an empty string to a function that states it takes float as it's argument is certainly an edge case the developer should have thought of.
Re:We will try to stop fixing bugs in PHP by masklinn on Friday June 22, 2012 @06:28AM (#4146171)
The again, in PHP, interpreting strings as floats is not unusual and pretty well defined. So in PHP it's also a case the developer could have considered normal in his expectation that PHP would behave as usual (and it did, prior to 5.3, for this precise function)
Re:We will try to stop fixing bugs in PHP by methodin on Friday June 22, 2012 @07:16AM (#4146266)
Not for user-provided input. That's just a dumb thing to do in any language.
Re:We will try to stop fixing bugs in PHP by masklinn on Friday June 22, 2012 @09:00AM (#4146590)
> Not for user-provided input.

Not what for user-provided input? The source of a string does not matter to this rule of PHP: a string used in numeric context will be parsed and converted, if it can not be parsed as a number its numeric value will be 0. That's it. That's how the language defines strings in numeric contexts.

> That's just a dumb thing to do in any language.

Sure, you won't get any argument from me on that, but that remains how PHP works and has always worked.

Re:We will try to stop fixing bugs in PHP by TylerE on Friday June 22, 2012 @09:02AM (#4146592)
Probably. But then again, we're talking about a language where THIS happens:

php> echo "2coolforschool" + 1;

3

php> echo "2.1coolforschool" + 1;

3.1

php> echo "coolforschool" + 1;

1

So treating all kinds of garbage as valid numbers is absolutely part of PHP.

Re:We will try to stop fixing bugs in PHP by piggity on Saturday June 23, 2012 @12:33AM (#4150055)
That's just the general design philosophy of the MP components of the LAMP stack.

Do the stupidest thing that could possibly work; and it probably will. For now.