Bug #78562 [NEW]: money_format() returns string with incorrect number

From: Date: Wed, 18 Sep 2019 19:42:09 +0000
Subject: Bug #78562 [NEW]: money_format() returns string with incorrect number
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-222807@lists.php.net to get a copy of this message
From:             candace dot camarillo at vacasa dot com
Operating system: Apline Linux 3.8
PHP version:      7.2.22
Package:          *Math Functions
Bug Type:         Bug
Bug description:money_format() returns string with incorrect number

Description:
------------
---
From manual page: https://php.net/function.money-format
---
Running money_format() with the number 2040.33 returns a string with
2040.32.  Other numbers seem to work.  I have not iterated through
others to determine which cause the problem.  Playing with locale and
other flags makes no impact on the problem.

Test script:
---------------
echo money_format('%i', 2040.33); // returns '2040.32'

Expected result:
----------------
'2040.33'

Actual result:
--------------
'2040.32'

-- 
Edit bug report at https://bugs.php.net/bug.php?id=78562&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=78562&r=fixed
Fixed in release:                 https://bugs.php.net/fix.php?id=78562&r=alreadyfixed
Need backtrace:                   https://bugs.php.net/fix.php?id=78562&r=needtrace
Need Reproduce Script:            https://bugs.php.net/fix.php?id=78562&r=needscript
Try newer version:                https://bugs.php.net/fix.php?id=78562&r=oldversion
Not developer issue:              https://bugs.php.net/fix.php?id=78562&r=support
Expected behavior:                https://bugs.php.net/fix.php?id=78562&r=notwrong
Not enough info:                  https://bugs.php.net/fix.php?id=78562&r=notenoughinfo
Submitted twice:                  https://bugs.php.net/fix.php?id=78562&r=submittedtwice
register_globals:                 https://bugs.php.net/fix.php?id=78562&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=78562&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=78562&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=78562&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=78562&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=78562&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=78562&r=nozend
MySQL Configuration Error:        https://bugs.php.net/fix.php?id=78562&r=mysqlcfg


Thread (10 messages)

« previous php.bugs (#222807) next »