Bug #78292 [NEW]: NumberFormatter procedural functions dont work

From: Date: Mon, 15 Jul 2019 09:52:50 +0000
Subject: Bug #78292 [NEW]: NumberFormatter procedural functions dont work
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-221775@lists.php.net to get a copy of this message
From: delboy1978uk at gmail dot com Operating system: any PHP version: 7.1.30 Package: Unknown/Other Function Bug Type: Bug Bug description:NumberFormatter procedural functions dont work Description: ------------ When using numfmt_create() and numfmt_currency(), PHP flakes out and gives us some number in Scientific Notation, instead of formatting like US currency. Look here https://3v4l.org/QgS7U Test script: --------------- <?php $fmt = numfmt_create('en_US', NumberFormatter::TYPE_CURRENCY ); echo numfmt_format_currency($fmt, 32.00, "USD")."\n"; $fmt = new NumberFormatter( 'en_US', NumberFormatter::CURRENCY ); echo $fmt->formatCurrency(32.00, "USD")."\n"; /* output as follows 3.2E1 $32.00 Expected result: ---------------- $32.00 $32.00 Actual result: -------------- 3.2E1 $32.00 -- Edit bug report at https://bugs.php.net/bug.php?id=78292&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=78292&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=78292&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=78292&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=78292&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=78292&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=78292&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=78292&r=needscript Try newer version: https://bugs.php.net/fix.php?id=78292&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=78292&r=support Expected behavior: https://bugs.php.net/fix.php?id=78292&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=78292&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=78292&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=78292&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=78292&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=78292&r=dst IIS Stability: https://bugs.php.net/fix.php?id=78292&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=78292&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=78292&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=78292&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=78292&r=mysqlcfg

« previous php.bugs (#221775) next »