Edit report at https://bugs.php.net/bug.php?id=63737&edit=1

 ID:                 63737
 Updated by:         ahar...@php.net
 Reported by:        google...@php.net
 Summary:            json_decode does not properly decode with options
                     parameter
-Status:             Open
+Status:             Analyzed
 Type:               Bug
 Package:            JSON related
 PHP Version:        5.4.9
-Assigned To:        
+Assigned To:        aharvey
 Block user comment: N
 Private report:     N

 New Comment:

Our code path for bare integer literals is different to the one we use for 
literals within objects and arrays. Should be an easy fix.


Previous Comments:
------------------------------------------------------------------------
[2012-12-11 11:03:24] google...@php.net

Description:
------------
json_decode does not properly decode JSON strings using options parameter.



Test script:
---------------
json_decode('12345678901234567890', false, 512, JSON_BIGINT_AS_STRING); // this 
won't work

However this will

json_decode('[12345678901234567890]', false, 512, JSON_BIGINT_AS_STRING);

Expected result:
----------------
string(20) "12345678901234567890"

Actual result:
--------------
float(1.2345678901235E+19)


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



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

Reply via email to