Skip to content

NumberFormatter::formatCurrency incompatible between 7.4.29 and 7.4.28 #1301

@sogaoh

Description

@sogaoh

The results of running the following script were different between php:7.4.29-fpm-alpine and php:7.4.28-fpm-alpine.

<?php

$fmt = new \NumberFormatter('JA_JP', \NumberFormatter::CURRENCY);
$formatString = $fmt->formatCurrency(0, 'JPY');

var_dump($formatString);

Result

  • php:7.4.28-fpm-alpine (I expects)

    string(4) "¥0"
  • php:7.4.29-fpm-alpine

    string(3) "¥0"

(My) problem

Is there any way to get the results in php:7.4.29-fpm-alpine to be what they were in php:7.4.28-fpm-alpine ? (Is there a workaround?)

Way to reproduce

see https://github.com/sogaoh/reproduce-incompatibility-of-format-currency (README.md)

Remarks

( unconfirmed ) I'm guessing that there is a similar problem between

  • 8.0.19 and 8.0.18
  • 8.1.6 and 8.1.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionUsability question, not directly related to an error with the image

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions