Bug #66852 [Opn->Csd]: Error in json_decode function
| From: | php at zeflo dot com | Date: | Sat, 08 Mar 2014 00:55:43 +0000 |
| Subject: | Bug #66852 [Opn->Csd]: Error in json_decode function | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-184618@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66852&edit=1
ID: 66852
User updated by: php at zeflo dot com
Reported by: php at zeflo dot com
Summary: Error in json_decode function
-Status: Open
+Status: Closed
Type: Bug
Package: Unknown/Other Function
Operating System: Linux
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
I used 5.2.12. I see that in new versions this bug is already closed
Previous Comments:
------------------------------------------------------------------------
[2014-03-08 00:34:59] php at zeflo dot com
Description:
------------
I discovered tha jason_decode can't decode 0e+1. Is this a Bug or a Feature?
Test script:
---------------
Works:
print_r(json_decode('{"var":0.e+1}'));
print_r(json_decode('{"var":0.e-1}'));
print_r(json_decode('{"var":0.0e+1}'));
print_r(json_decode('{"var":0.0e-1}'));
Will not Work:
print_r(json_decode('{"var":0e+1}'));
print_r(json_decode('{"var":0e-1}'));
Expected result:
----------------
Every line should return:
stdClass Object ( [var] => 0 )
Actual result:
--------------
The last two lines return nothing.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66852&edit=1