Edit report at https://bugs.php.net/bug.php?id=63737&edit=1
ID: 63737 Updated by: google...@php.net Reported by: google...@php.net Summary: json_decode does not properly decode with options parameter Status: Re-Opened Type: Bug Package: JSON related PHP Version: 5.4.9 Assigned To: aharvey Block user comment: N Private report: N New Comment: This commit has been removed from the release branch for some reason. Previous Comments: ------------------------------------------------------------------------ [2013-01-02 11:46:49] franssen dot roland at gmail dot com This is still an issue in 5.4.10 (Linux) ------------------------------------------------------------------------ [2012-12-11 12:04:17] ahar...@php.net The fix for this bug has been committed. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Fixed on 5.4, 5.5 and master. ------------------------------------------------------------------------ [2012-12-11 11:04:55] ahar...@php.net 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. ------------------------------------------------------------------------ [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