Edit report at https://bugs.php.net/bug.php?id=50696&edit=1
ID: 50696
Comment by: izanagisan at gmail dot com
Reported by: endosquid at endosquid dot com
Summary: number_format when passed a 0 as first function
argument, returns null
Status: Wont fix
Type: Bug
Package: Math related
Operating System: Linux 32 bit
PHP Version: 5.3.1
Block user comment: N
Private report: N
New Comment:
at so many points in this conversation a little understanding from the
submitter
of the bug would have been beneficial. He led the thread into a silly fuss
instead of making it a search for solutions, even when in his situation there
was
little hope he'd get one. Surely Rasmus was the perfect person to help him, if
he'd just asked kindly instead of proposing the whole PHP development team was
mad for attempting to standardize the language a bit more
months or no months of changing and testing, he handled this poorly
Previous Comments:
------------------------------------------------------------------------
[2012-06-22 04:20:52] contact at joezimjs dot com
I agree with Endosquid. What you did isn't a "bug fix". Whether or not it
complies with your zend_parse_parameters() nonsense is not the point. A
function should only return values that make sense for that function to return.
number_format is supposed to return a string of a number in a specific format.
NULL is neither a string nor a number.
However, the documentation does dictate that number_format's first parameter is
supposed to be a float, and it is the programmer's job to supply correct
parameters to the functions they use. If you supply a string when there should
be a number, you're doing it wrong.
Sooo, you both fail at your jobs. :D
------------------------------------------------------------------------
[2011-08-23 01:41:43] jacob at jacobweber dot com
Fun thread! Anyway, I was wondering if anyone has a complete list of the
functions
that changed as a result of this zend_parse_parameters() fix. I don't see
anything
specific in the upgrade instructions:
http://www.php.net/manual/en/migration53.incompatible.php
Also, will number_format((float) $x) behave under PHP 5.3.x exactly the same
way
that number_format($x) behaved under PHP 5.2.x? Are there any subtle
differences?
Thanks.
------------------------------------------------------------------------
[2010-01-08 23:47:19] [email protected]
Sir.
This issue was recently brought to my attention.
On behalf of PHP I would like to apologize. I see that now that you have been
treated unfairly.
After carefully reviewing this bug report with our board of directors on 4chan,
we have come to the conclusion that your "rusty C skills" should be enough to
fix the issue.
I would therefore like to remind you that [email protected] is
http://en.wikipedia.org/wiki/Rasmus_lerdorf
Again, I sincerely apologize. We will try to stop fixing bugs in PHP.
------------------------------------------------------------------------
[2010-01-08 23:22:52] endosquid at endosquid dot com
Just look in the mirror, pal.
You need classes on how to listen to others.
------------------------------------------------------------------------
[2010-01-08 23:20:13] [email protected]
Wow, a classic case of how not to treat unpaid volunteers who provide
critical pieces of your money-making infrastructure.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=50696
--
Edit this bug report at https://bugs.php.net/bug.php?id=50696&edit=1