|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45791 json_decode does not handle number 0e0
Submitted: 2008-08-11 22:53 UTC Modified: 2008-12-17 14:47 UTC
Avg. Score:4.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: php at rjbs dot manxome dot org Assigned:
Status: Closed Package: JSON related
PHP Version: 5.2CVS, 5.3CVS, 6CVS (2008-08-25) OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: php at rjbs dot manxome dot org
New email:
PHP Version: OS:


 [2008-08-11 22:53 UTC] php at rjbs dot manxome dot org
as a number literal, 0e0 is valid JSON.  json_decode translates it into 

Reproduce code:
~$ php
<? var_dump(json_decode('{"zero": 0e0}')) ?>

Expected result:
something like:

object(stdClass)#1 (1) {

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-12-17 14:47 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

This has been fixed in the PHP 5.3 branch, If I can get a simpler fix for 5.2 I will add it there too.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 27 10:01:30 2024 UTC