php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37003 money_format is not outputting the correct format.
Submitted: 2006-04-06 22:02 UTC Modified: 2006-04-06 22:07 UTC
From: nexact at gmail dot com Assigned:
Status: Not a bug Package: Output Control
PHP Version: 5.1.2 OS: FreeBSD 5.4-STABLE
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: nexact at gmail dot com
New email:
PHP Version: OS:

 

 [2006-04-06 22:02 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-06 22:03 UTC] nexact at gmail dot com
Oops, Inverse Expected result and Actual result ! :)
 [2006-04-06 22:07 UTC] tony2001@php.net
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.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Feb 05 17:01:30 2025 UTC