Earlier quoted context omitted.
So you dismiss a bunch of valid breaking changes because you weren't affected by them and then cite one you know about. Well played, sir.
Well no, all I'm saying is that they indeed were breaking changes, but not "obscure design decisions". All of them were made for a reason and the reasons were public. Some of them had easy workarounds (like a commandline switch) Most of them happened at the transition of a major release and made the introduction of major features possible. Ruby 1.8.6/7 was supported for years after the transition for people that had…
We will try to stop fixing bugs in PHP
291–300 of 319 posts
Re: We will try to stop fixing bugs in PHP
#292Earlier quoted context omitted.
I disagree with (A). According to the php docs floatval('122.34343The') == 122.34343 floatval('BLARTLBARTFAST') == 0 Why should it take the input and choose a different response than what floatval would respond with? If floatval returns null on 'BLARTLBARTFAST' and '122.34343The' then this function should return null. If floatval returns 0 (or whatever) than this function should return the same. It's inconsistent beh…
> I disagree with (A). Since you quite clearly have no idea what function we're even talking about or what it's supposed to do, I will just point you to the documentation rather than more explicitly explain on how many levels you are wrong: http://www.php.net/manual/en/function.number-format.php
Re: We will try to stop fixing bugs in PHP
#293Having number_format in so many thousands of places across so many products is indicative of pretty poor code. If you have bad code, you can hardly expect to be able to upgrade to new versions of the language seamlessly. Speaking of which, are they going to upgrade to 5.3 without testing all those thousands of places across all their products?
Re: We will try to stop fixing bugs in PHP
#294Regardless of merit on either side, the attitude presented by the creator of PHP in this post makes PHP and open source in general look bad. Seriously? I still can't believe that's how the situation was handled. EDIT: Rasmus calls the bug reporter an idiot in the first reply. It's probably some sysadmin that has been tasked with upgrading the infrastructure and really has no idea what to do. So rude. It would take ju…
Can you imagine how many fools like this Rasmus Lerdorf has to deal with, every. single. day. since he created PHP? Same for Linus Torvalds. After a while, you just stop trying to sugar-coat idiocy, and just tell them as it is.
Re: We will try to stop fixing bugs in PHP
#295Earlier quoted context omitted.
> First of all, why does the function even accept strings? Why not? > There should be some eception happening. PHP's built-in functions do not ever throw exceptions. > Second, why does it return 0, i could understand NULL but not 0 Well it doesn't anymore, but it used to, and that kind-of made sense in the context of the language being PHP : in PHP (userland), when using a string in a numeric context that string will…
Just shows me how broken this language is to the core.
The problem with PHP's weak typing is PHP's hit-and-miss implementation. Check out AWK, another weakly typed language, for example:
BEGIN{printf "%5.2f\n", ""}
prints "0.00" as would be reasonable.
Re: We will try to stop fixing bugs in PHP
#296Earlier quoted context omitted.
I think there are two bigger issues: 1.) Things like this should not be warnings in the first place. There should be more strict handling of invalid input so they result in actual exceptions being thrown instead of output that can be exploited in incorrect/undocumented ways. 2.) The php.net documentation for number_format doesn't even state that NULL is a possible output value. And I can't find anything in the change…
Quotes like this keep me from sleeping well at night: > It's not a number definition, but FORMATTING. How do you format nothing in the numerical system? By having it be zero. You don't have NULL dollars in your bank account, do you? He goes on to say that "this is tax data and has to be precise for tax planning and retirement planning." Think about that for a minute. A guy claiming to write tax planning software does…
Re: We will try to stop fixing bugs in PHP
#297Love this snippet: > > Please escalate this to someone who can answer the question as to why this was changed. -- endosquid at endosquid dot com > Escalate? Oh how I wish I had someone to escalate to. -- rasmus@php.net
Rasmus comes across as a little kid. Here's how I read it: We have this public API that we're not exactly sure how it works version to version, and, oh, we've just changed our parsing code so if it breaks your stuff then tough shit because we're a bunch of amateurs. I especially liked this quote: "Wow, a classic case of how not to treat unpaid volunteers who provide critical pieces of your money-making infrastructure…
Really? You read it wrong. It is "he have a public API that had a bug --that only surfaced when using it in a brain damaged way, anyway-- and we fixed it along with doing several DRY improvements to our code base. We also gave ample time of advance warning with our beta releases".
"so if it breaks your stuff then tough shit because we're a bunch of amateurs."
An ad-hominem? And its Rasmus that cones out as a little child, to your "mature" reading of the situation? Priceless.
>I especially liked this quote: "Wow, a classic case of how not to treat unpaid volunteers who provide critical pieces of your money-making infrastructure." Perhaps it isn't about being paid, but about taking pride in the work you do.
That includes fixing bugs and brain damaged edge cases of the public API.
The complainer and your reading are so off the mark, I can't even begin to comprehend such attitudes exist...
Re: We will try to stop fixing bugs in PHP
#298Headline of this post is totally false and this is not even a bug in PHP, it's clearly a bug in the poster's code, so Rasmus response is right. If you actually try doing this in PHP you get this: print number_format("",0); Warning: number_format() expects parameter 1 to be double, string given in Command line code on line 1 So the poster willfully ignored the warning. You can fix this simply by casting the first arg…
This stuff happened over 2 years ago, and what he was referring to was an ANTICIPATED change sir. Not one he'd run into at the time, since it had yet to be changed to something random and unexpected.
What kind of programmer passes "" and null on a function such as this and expects ....zero in return?
And what kind of programmer does it --as he admits-- "all around the place"?
If you give right to this guy, that's a very very short and accurate interview question --no hire.
Re: We will try to stop fixing bugs in PHP
#299Earlier quoted context omitted.
And his point still stands. :) Could not resist.
I know you're joking, but his point is very badly made. Anything that can support ~1 billion users is not piddly. Facebook are doing amazing work with PHP, as are many others at a very large scale. Why the unpaid work of Rasmus and many, many other open source contributors like him, who's hard work facilitated the growth of massive web sites like Facebook, is constantly being ridiculed on threads like this is sickeni…
Re: We will try to stop fixing bugs in PHP
#300Considering the filer of the report goes on to say this, at what point did they fail to realise that moving from an "old PHP 5.1.6 Solaris 8 box" to an "RHEL5 with 5.3.1" should have required the same level of testing and signing off?
No sympathy for a developer who completely changes their environment (OS, PHP version, at the very least) and then bitches about stuff they failed to anticipate not working. This is not a reflection on PHP, for once.