Bug #55290 [NEW]: \NumberFormatter::parseCurrency() fails
From:
Operating system: Ubuntu 11.04
PHP version: 5.3.6
Package: I18N and L10N related
Bug Type: Bug
Bug description:\NumberFormatter::parseCurrency() fails
Description:
------------
Hi,
The example code at
http://nl2.php.net/manual/en/numberformatter.parsecurrency.php
doesn't seem
to work for me.
This is perhaps also related to bug #54163 (?)
---
version 1.1.0
ICU version 4.4.1
Directive Local Value Master Value
intl.default_locale no value no value
intl.error_level 0 0
Test script:
---------------
<?php
$fmt = numfmt_create( 'de_DE', NumberFormatter::CURRENCY );
$num = "1.234.567,89 $";
echo "We have ".numfmt_parse_currency($fmt, $num, $curr)." in $curr\n";
echo \PHP_EOL;
$fmt = new NumberFormatter( 'de_DE', NumberFormatter::CURRENCY );
$num = "1.234.567,89 $";
echo "We have ".$fmt->parseCurrency($num, $curr)." in $curr\n";
die;
Expected result:
----------------
We have 1234567.89 in USD
We have 1234567.89 in USD
Actual result:
--------------
We have <FALSE> in <NULL>
We have <FALSE> in <NULL>
--
Edit bug report at https://bugs.php.net/bug.php?id=55290&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=55290&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=55290&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=55290&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=55290&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=55290&r=needdocs
Fixed in release: https://bugs.php.net/fix.php?id=55290&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=55290&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=55290&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=55290&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=55290&r=support
Expected behavior: https://bugs.php.net/fix.php?id=55290&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=55290&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=55290&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=55290&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=55290&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=55290&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=55290&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=55290&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=55290&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=55290&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=55290&r=mysqlcfg
Thread (11 messages)
- franssen dot roland at gmail dot com
- franssen dot roland at gmail dot comBug #55290 [Com]: \NumberFormatter::parseCurrency() fails
- franssen dot roland at gmail dot comBug #55290 [Opn]: \NumberFormatter::parseCurrency() fails
- johnlinton at mailinator dot netBug #55290 [Com]: \NumberFormatter::parseCurrency() fails
- franssen dot roland at gmail dot comBug #55290 [Com]: \NumberFormatter::parseCurrency() fails
- mail at michael-weimann dot euBug #55290 [Com]: \NumberFormatter::parseCurrency() fails
- fkrautwald at gmail dot comBug #55290 [Com]: \NumberFormatter::parseCurrency() fails
- franssen dot roland at gmail dot comBug #55290 [Com]: \NumberFormatter::parseCurrency() fails
- fkrautwald at gmail dot comBug #55290 [Com]: \NumberFormatter::parseCurrency() fails
- hannes dot forsgard at gmail dot comBug #55290 [Com]: \NumberFormatter::parseCurrency() fails
- cmb@php.netBug #55290 [Opn->Csd]: \NumberFormatter::parseCurrency() fails