php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59377 Error converting a float to JSON
Submitted: 2010-08-20 10:55 UTC Modified: 2013-02-18 00:35 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: jmoreira at microdual dot com Assigned:
Status: No Feedback Package: json (PECL)
PHP Version: 5.2.4 OS: Ubuntu
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
21 + 11 = ?
Subscribe to this entry?

 
 [2010-08-20 10:55 UTC] jmoreira at microdual dot com
Description:
------------
When i'm converting some array that has inside a flot value, json_encode() will output it with a comma "," when it should convert to a point "."


Reproduce code:
---------------
$array['myfloat'] = 3,44;
echo json_encode($array);

Expected result:
----------------
{myfloat:3.44}

Actual result:
--------------
{myfloat:3,44}

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-02-21 19:24 UTC] rasmus@php.net
-Status: Open +Status: Feedback
 [2012-02-21 19:24 UTC] rasmus@php.net
Are you still seeing this? What is your LOCALE set to?
 [2013-02-18 00:35 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 10:01:31 2024 UTC