php Programming Exercies

PHP JSON Exercises : Decode larger integers

PHP JSON: Exercise-2 with Solution

Write a PHP script to decode large integers.

Sample integer :
{"number": 123456789012345678901234567890}

Sample Solution:

PHP Code:

$json = '{"number": 123456789012345678901234567890}';

Sample Output:

object(stdClass)#1 (1) {                                            

Flowchart :

Flowchart: Decode larger integers

PHP Code Editor:

Have another way to solve this solution? Contribute your code (and comments) through Disqus.

Previous: Write a PHP script to decode a JSON string.
Next: Write a PHP script to get JSON representation of a value from an array.

What is the difficulty level of this exercise?

New Content: Composer: Dependency manager for PHP, R Programming