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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 15:01:29 2024 UTC