#45791 [Opn->Ver]: json_decode does not handle number 0e0

From: Date: Tue, 26 Aug 2008 22:47:01 +0000
Subject: #45791 [Opn->Ver]: json_decode does not handle number 0e0
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-128445@lists.php.net to get a copy of this message
 ID:               45791
 Updated by:       jani@php.net
 Reported By:      php at rjbs dot manxome dot org
-Status:           Open
+Status:           Verified
 Bug Type:         JSON related
 Operating System: Mac OSX 10.5
-PHP Version:      5.2.6
+PHP Version:      5.2CVS, 5.3CVS, 6CVS (2008-08-25)


Previous Comments:
------------------------------------------------------------------------

[2008-08-11 22:53:17] php at rjbs dot manxome dot org

Description:
------------
as a number literal, 0e0 is valid JSON.  json_decode translates it into

NULL

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



Expected result:
----------------
something like:

object(stdClass)#1 (1) {
  ["zero"]=>
  float(0)
}




Actual result:
--------------
NULL


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=45791&edit=1



Thread (3 messages)

« previous php.bugs (#128445) next »