Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"money_format" removed in PHP 8.0 #1215

Open
geekwright opened this issue Apr 9, 2022 · 3 comments
Open

"money_format" removed in PHP 8.0 #1215

geekwright opened this issue Apr 9, 2022 · 3 comments
Assignees

Comments

@geekwright
Copy link
Contributor

"money_format" removed in PHP 8.0
Used in \htdocs\language\english\locale.php and likely other languages

Originally posted by @mambax7 in #1213 (comment)

@geekwright geekwright self-assigned this Apr 9, 2022
@geekwright
Copy link
Contributor Author

A temporary solution is provided as part of #1227

Long term, any locale code should be reworked using NumberFormatter::formatCurrency()
See: https://www.php.net/manual/en/numberformatter.formatcurrency.php

Example:

$fmt = new NumberFormatter( 'de_DE', NumberFormatter::CURRENCY );
$result = $fmt->formatCurrency(1234.56, "EUR");

$result will be the string "1.234,56 €"

@mambax7
Copy link
Collaborator

mambax7 commented Apr 23, 2022

Thank you!

@mambax7
Copy link
Collaborator

mambax7 commented Apr 24, 2022

Unless we want to change the existing function, as I proposed last year?
#1078

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants