|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #63165 Error with "%.0n" for windows replacement formula of money-format
Submitted: 2012-09-26 17:14 UTC Modified: 2017-01-28 12:20 UTC
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: somadden at gmail dot com Assigned:
Status: Open Package: Strings related
PHP Version: Irrelevant OS: window 7
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.
Block user comment
Status: Assign to:
Bug Type:
From: somadden at gmail dot com
New email:
PHP Version: OS:


 [2012-09-26 17:14 UTC] somadden at gmail dot com
From manual page:
In the user posted formula for windows

$right      = trim($fmatch[4]) ? (int)$fmatch[4] : $locale['int_frac_digits'];

$right      = (trim($fmatch[4]) || trim($fmatch[4]) === '0' ) ? (int)$fmatch[4] : 

Test script:
echo money_format('%.0n', 20000);

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-04-15 17:47 UTC] ppaisndud at gmail dot com
This a problem with user notes.
 [2017-01-28 12:20 UTC]
-Package: Documentation problem +Package: Strings related
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Jun 16 13:01:23 2021 UTC