note 46405 rejected from function.sprintf by betz
| From: | betz@php.net | Date: | Sat, 09 Oct 2004 23:35:19 +0000 |
| Subject: | note 46405 rejected from function.sprintf by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-78255@lists.php.net to get a copy of this message | ||
Note Submitter: phpmanual at oderwat dot de
----
I just stumbled over a problem:
sprintf("%06.2f",2.20)
does get "000002.20" on my linux 4.3.6 php
and it gets "2.20" on my windows 5.0.2 php
"decimal" just works fine!
I think that is dangerous behaviour! As many database related stuff works with fixed fields. In my
case a "ksort()" was going wrong for that reason!