Edit report at https://bugs.php.net/bug.php?id=63193&edit=1
ID: 63193 Updated by: [email protected] Reported by: jan dot winkler at adspirit dot de Summary: json_decode procudes wrong int values -Status: Open +Status: Feedback Type: Bug Package: JSON related Operating System: linux PHP Version: 5.3.17 Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2012-10-01 15:26:36] [email protected] do you run with a 32-bit OS? ------------------------------------------------------------------------ [2012-10-01 13:03:06] jan dot winkler at adspirit dot de Description: ------------ the following code produces a wrong number when decoded: $a = array('a'=>5584842151736052644); $x = json_encode($a); print_r(json_decode($x)); ... will output stdClass Object ( [a] => 5584842151736052736 ) instead of 5584842151736052644 Test script: --------------- $a = array('a'=>5584842151736052644); $x = json_encode($a); print_r(json_decode($x)); Expected result: ---------------- json_decode should output stdClass Object ( [a] => 5584842151736052644 ) Actual result: -------------- stdClass Object ( [a] => 5584842151736052736 ) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=63193&edit=1
