Hi,

I was trying to enhance the functionality of number_format() (not finished,
as I think I need to ask about changes first :-)), and happened to notice
this bug while testing and saw it mentioned in a couple bug reports from
almost 2 years ago, but it hasn't been fixed.  Bug #29538, and it's also
mentioned at the end of #28228.  Where

number_format(1234, 2, '', ',')

returns 123,400 instead of the expected 1,23400

Happens when decimal places is > 0 with an empty decimal separator.  There's
a test with that criteria, but the thousands separator is also empty, which
hides the bug.

I was going to wait and include the fix with my proposed number_format
changes, but I was thinking you may want to patch this in 4.4.3 also (just
fixing the bug, since I know it doesn't get new features).  I don't know the
backporting "protocol" or if it's too late for 4.4.3, I just saw that Derick
wants to release it this month and wanted to ask.

I'll send a patch for all 3 branches if you want it, otherwise I'll just
wait...


Matt

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to