Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:24901 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74851 invoked by uid 1010); 23 Jul 2006 10:22:20 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 74835 invoked from network); 23 Jul 2006 10:22:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jul 2006 10:22:20 -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:43804] helo=msa2-mx.centurytel.net) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id 59/98-04178-BDD43C44 for ; Sun, 23 Jul 2006 06:22:20 -0400 Received: from pc1 (ppp1096.lr.centurytel.net [64.91.12.199]) by msa2-mx.centurytel.net (8.13.6/8.13.6) with SMTP id k6NAMGaZ007548; Sun, 23 Jul 2006 05:22:16 -0500 Message-ID: <00e301c6ae41$dfbd7300$0201a8c0@pc1> To: , References: <007001c6ab21$b8d560e0$0201a8c0@pc1> <00fb01c6ad81$f3b61260$0201a8c0@pc1> <44C280B7.5050504@php.net> Date: Sun, 23 Jul 2006 05:22:17 -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: Re: [PHP-DEV] [PATCH] number_format enhancements From: php_lists@realplain.com ("Matt W") Hi, ----- Original Message ----- From: "bertrand Gugger" Sent: Saturday, July 22, 2006 > Bonsoir Matt, > Matt W wrote: > > Hi, > > > > Haven't heard any opinions on these functionality changes... (Though I know > > more significant things keep you busy!) > > > > Do many other people use number_format()?? Wouldn't allowing thousands > > separator as param #2 simplify things? > > > > Any issues with the semantics of operation? Negative precision to specify > > trailing zero removal seems fine at least, even though that's different than > > round()'s behavior. > > > > I've now made some tests, including changes of course, in case you were just > > waiting for them? Hope they're enough. > > > > http://realplain.com/php/number_format.phpt > I did not look into that .phpt link > I belong only to userland , so have less to tell here. > > Give some basic userland examples about what you propose to change, > please ... > (I guess these are a part of the .phpt) > > Bravo for the way you propose things. > > Kind regards, > -- > toggg In the .phpt file, it is userland code where you can see examples of how the changes work. :-) I'm on Windows, so I don't know how you apply the .diff to your source download -- shouldn't diff work somehow? :-/ Well, I uploaded the full math.c file for 5.2 and 6 if you want to grab that to replace yours (ext/standard/math.c) and experiment with the changes. http://realplain.com/php/math.c-number_format_enhancements.tar.gz (5.2/6.0 directories with the file.) Glad you like the idea. :-) I just hope functionality like this can be added -- using my patch or not, or slightly different semantics... All I want is a no extra 0's option and not be forced to include 2 unnecessary decimal-related parameters to "get to" thousands separator when I don't want any decimals! ;-D Matt