|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53507 json_encode of float value
Submitted: 2010-12-09 15:05 UTC Modified: 2010-12-11 16:08 UTC
From: johann at infomaniak dot ch Assigned: iliaa (profile)
Status: Closed Package: JSON related
PHP Version: 5.2.14 OS: Linux
Private report: No CVE-ID: None
 [2010-12-09 15:05 UTC] johann at infomaniak dot ch
json_encode of float doesn't work when a locale is define which use comma (,) as separator (ex: fr_FR)

Test script:
'fAmount' => 12.12

setlocale(LC_ALL, 'fr_FR');

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-10 02:21 UTC]
-Package: Systems problem +Package: JSON related
 [2010-12-11 16:08 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: iliaa
 [2010-12-11 16:08 UTC]
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 26 00:01:30 2024 UTC