ID: 42831 Updated by: [EMAIL PROTECTED] Reported By: naweokawa at free dot fr -Status: Open +Status: Feedback Bug Type: Strings related Operating System: Solaris 10 PHP Version: 5.2.4 New Comment:
GCC 3.4.3 is quite old and is known to have problems on SPARC. Try with something newer (the latest available would be great). Previous Comments: ------------------------------------------------------------------------ [2007-10-03 10:25:16] naweokawa at free dot fr Always same issue with (GCC) 3.4.3 (csl-sol210-3_4-branch+sol_rpath) ------------------------------------------------------------------------ [2007-10-03 09:47:27] [EMAIL PROTECTED] Try compiling with GCC. ------------------------------------------------------------------------ [2007-10-03 09:13:18] naweokawa at free dot fr it seems to run correctly on Linux (tested on Linux xxx 2.6.8-2-386 #1 Tue Aug 16 12:46:35 UTC 2005 i686 GNU/Linux) Reproduce code: --------------- $num2=123456.55; echo number_format($num2 , 2, ',', ' '); echo "<br />\n"; echo number_format($num2 , 3, ',', ' '); // OUTPUT 123 456,55 (OK) 123 456,550 (OK) However on Solaris10 (SunOS xxx 5.10 Generic_118855-33 i86pc i386 i86pc) Reproduce code: --------------- $num2=123456.55; echo number_format($num2 , 2, ',', ' '); echo "<br />\n"; echo number_format($num2 , 3, ',', ' '); // OUTPUT 12 345 655,00 (KO) 123 456 550,000 (KO) - The Locale settings shouldn't used for this function ? - php-5.2.4 compiled with cc: Sun C 5.8 2005/10/13 ------------------------------------------------------------------------ [2007-10-03 08:19:13] [EMAIL PROTECTED] Cannot reproduce. ------------------------------------------------------------------------ [2007-10-02 16:55:10] naweokawa at free dot fr Description: ------------ When you use the function number_format with a float value, it seems to returns a value INPUT_FLOAT*100 Reproduce code: --------------- $num2=123456.55; number_format($num2 , 2, ',', ' '); // OUTPUT output : 12 345 655,00 (should be 123 456,55 ) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42831&edit=1