|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-12-02 13:01 UTC] info at marcel-schlesinger dot de
[2008-12-02 14:35 UTC] mattwil@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 08:00:01 2025 UTC |
Description: ------------ Using json_decode with numbers higher then 2147483647 on a 32Bit maschine is still wrong! E.g. 5095334700020 has to be converted into a float (a string would be also okay), but not into an integer! Reproduce code: --------------- <?php $json = '{"number":5095334700020}'; var_dump(json_decode($json)); ?> Expected result: ---------------- object(stdClass)#1 (1) { ["number"]=> float(5095334700020) } it could also be: object(stdClass)#1 (1) { ["number"]=> string(13) "5095334700020" } Actual result: -------------- object(stdClass)#1 (1) { ["number"]=> int(2147483647) }