bertrand Gugger wrote:
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.
I did :
$ wget http://snaps.php.net/php5.2-200607222030.tar.bz2
$ tar xjf php5.2-200607222030.tar.bz2
$ cd php5.2-20060722203
$ cat ../php-5.1.4/config.nice
#! /bin/sh
#
# Created by configure

'./configure' \
'--with-zlib' \
'--without-pear' \
'--without-xmlrpc' \
'--program-suffix=5' \
'--enable-cli' \
'--disable-cgi' \
'--enable-memory-limit' \
"$@"
$ ./configure < ../php-5.1.4/config.nice
$ make
$ sapi/cli/php run-tests.php ~/A/mattW/number_format.phpt

which naturally failed

$ cat ~/A/mattW/number_format.diff 010+ 123
011+ 1,234,567,890
010- 0123
011- 12,345,67890
020+ 10
020- 9.877
022+ 1 235
022- 1 234.51
025+ 1,235
026+ 12,345
025- 1235
027- 12 345
028+ 9,876,543
028- 9.876.543

I hope these are tests , sorry for the userland phrasing.
I guess target is test does not fail.

à+
--
toggg

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

Reply via email to