#37003 [Opn->Bgs]: money_format is not outputting the correct format.

From: Date: Thu, 06 Apr 2006 22:07:46 +0000
Subject: #37003 [Opn->Bgs]: money_format is not outputting the correct format.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-95399@lists.php.net to get a copy of this message
ID: 37003 Updated by: tony2001@php.net Reported By: nexact at gmail dot com -Status: Open +Status: Bogus Bug Type: Output Control Operating System: FreeBSD 5.4-STABLE PHP Version: 5.1.2 New Comment: money_format() function uses strfmon (man strfmon), which in turn depends on your current locale and this particular issue means that post likely your locale is broken. This is what I get on Linux: #php -r 'echo money_format("%=*+#10.2n\n","-5.36");' -*********5.36 Sorry, I doubt that we can do something about it. Previous Comments: ------------------------------------------------------------------------ [2006-04-06 22:03:43] nexact at gmail dot com Oops, Inverse Expected result and Actual result ! :) ------------------------------------------------------------------------ [2006-04-06 22:02:46] nexact at gmail dot com Description: ------------ money_format(); is not outputting in the correct format. Reproduce code: --------------- <? echo money_format('%=*+#10.2n','-5.36'); ?> Expected result: ---------------- (*********5.36) Actual result: -------------- -*********5.36 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37003&edit=1

« previous php.bugs (#95399) next »