From: Operating system: all ? windows7 x64 PHP version: 5.3.5 Package: I18N and L10N related Bug Type: Bug Bug description:wrong result when parse ::ORDINAL strings ->parse("2nd")
Description: ------------ hi define("E", "\n"); $round = new \NumberFormatter("en", \NumberFormatter::ORDINAL); echo $round->format(6).E; // OUTPUTS 6th $round = new \NumberFormatter("en", \NumberFormatter::ORDINAL); echo var_dump($round->parse("6th")).E; // OUTPUTS float 122!!! echo $round->getErrorMessage().E; // ZERO ERROR gives me error only with "en-*" locale this works good: $round = new \NumberFormatter("it_IT", \NumberFormatter::ORDINAL); echo var_dump($round->parse("6°")).E; // OUTPUTS float 6 echo var_dump($round->parse("123esimo")).E; // OUTPUTS float 123 echo $round->getErrorMessage().E; // ZERO ERROR -- Edit bug report at http://bugs.php.net/bug.php?id=54294&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=54294&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=54294&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=54294&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=54294&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=54294&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=54294&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=54294&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=54294&r=needscript Try newer version: http://bugs.php.net/fix.php?id=54294&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=54294&r=support Expected behavior: http://bugs.php.net/fix.php?id=54294&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=54294&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=54294&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=54294&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54294&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=54294&r=dst IIS Stability: http://bugs.php.net/fix.php?id=54294&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=54294&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=54294&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=54294&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=54294&r=mysqlcfg