Q:

Write a PHP script to decode large integers

0

Write a PHP script to decode large integers.

Sample integer :
{"number": 123456789012345678901234567890}

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

<?php
$json = '{"number": 123456789012345678901234567890}';
var_dump(json_decode($json));
?>

Sample Output:

object(stdClass)#1 (1) {                                            
  ["number"]=>                                                      
  float(1.2345678901235E+29)                                        
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now