Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:24304 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91163 invoked by uid 1010); 10 Jul 2006 08:08:40 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 91148 invoked from network); 10 Jul 2006 08:08:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jul 2006 08:08:40 -0000 X-PHP-List-Original-Sender: php_lists@realplain.com X-Host-Fingerprint: 209.142.136.132 msa2-mx.centurytel.net Linux 2.4/2.6 Received: from ([209.142.136.132:40515] helo=msa2-mx.centurytel.net) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id 92/C3-16663-60B02B44 for ; Mon, 10 Jul 2006 04:08:40 -0400 Received: from pc1 (d3-4.rt-bras.wnvl.centurytel.net [69.179.130.4]) by msa2-mx.centurytel.net (8.13.6/8.13.6) with SMTP id k6A88Z5Y004442 for ; Mon, 10 Jul 2006 03:08:35 -0500 Message-ID: <004101c6a3f8$0b335c10$0201a8c0@pc1> To: Date: Mon, 10 Jul 2006 03:08:35 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 Subject: number_format bug fix From: php_lists@realplain.com ("Matt W") 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