ID:               46730
 Updated by:       [EMAIL PROTECTED]
 Reported By:      info at marcel-schlesinger dot de
-Status:           Open
+Status:           Bogus
 Bug Type:         JSON related
 Operating System: ALL
 PHP Version:      5.2.6
 New Comment:

Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

Can't reproduce -- should be fixed since 5.2.4... Feel free to reopen
if you're actually using 5.2.6 and seeing this. :-)


Previous Comments:
------------------------------------------------------------------------

[2008-12-02 13:01:36] info at marcel-schlesinger dot de

Updated category

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

[2008-12-02 12:53:32] info at marcel-schlesinger dot de

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)
}


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


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

Reply via email to