PHP NumberFormatter format shows strange output

0 votes

I have this code in a PHP function:

$fmt = NumberFormatter::create('de_DE', NumberFormatter::FRACTION_DIGITS);
echo $fmt->format(15);

output:

௰௫ 

After I did some research I found that these two characters are 15 in the Tamil language. But when I change the code like this:

$fmt = NumberFormatter::create('de_DE', NumberFormatter::FRACTION_DIGITS);
echo $fmt->format(15.5);

Then I get the expected result ie, 15.5 in German. My question is, why is Tamil coming up as a result? 

Jun 1, 2022 in PHP by Kichu
• 19,050 points
175 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In PHP

0 votes
1 answer

How to convert from MySQL datetime to another format with PHP?

Hello, To convert a date retrieved from MySQL ...READ MORE

answered May 19, 2020 in PHP by Niroj
• 82,880 points
2,992 views
0 votes
1 answer

How to output MySQL query results in CSV format?

Hello @kartik, Using this command columns names will ...READ MORE

answered Aug 18, 2020 in PHP by Niroj
• 82,880 points
2,126 views
0 votes
1 answer

How can I convert the output of PHP's filesize() function to a format with MegaBytes, KiloBytes etc?

Hello @kartik, Here is a sample: <?php // Snippet from ...READ MORE

answered Sep 15, 2020 in PHP by Niroj
• 82,880 points
3,395 views
0 votes
1 answer

Error:Cannot modify header information - headers already sent by (output started at /some/file.php:12) in /some/file.php on line 23

Hello @kartik, This error message gets triggered when anything is ...READ MORE

answered Sep 16, 2020 in PHP by Niroj
• 82,880 points
5,397 views
0 votes
1 answer

How to run process with realtime output in PHP?

Hello @kartik, This worked for me: $cmd = "ping ...READ MORE

answered Oct 20, 2020 in PHP by Niroj
• 82,880 points
3,584 views
0 votes
1 answer

How do I capture PHP output into a variable?

Hello, Try this: <?php ob_start(); ?> <xml/> <?php $xml = ob_get_clean(); ...READ MORE

answered Nov 3, 2020 in PHP by Niroj
• 82,880 points
804 views
0 votes
0 answers

Show a number to two decimal places

What's the correct way to round a ...READ MORE

Jun 24, 2022 in PHP by narikkadan
• 63,420 points
367 views
+1 vote
2 answers

Scp Php files into server using gradle

Tru something like this: plugins { id ...READ MORE

answered Oct 11, 2018 in DevOps & Agile by lina
• 8,220 points
1,207 views
0 votes
1 answer

How do I create folder under an Amazon S3 bucket through PHP API?

Of Course, it is possible to create ...READ MORE

answered Apr 24, 2018 in AWS by anonymous
10,978 views
0 votes
1 answer

Failure uploading Image on AmazonS3 with PHP SDK

Try this, I took it out from ...READ MORE

answered May 4, 2018 in AWS by Cloud gunner
• 4,670 points
3,773 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP