Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ php -v
- PHP 5.3.2-1ubuntu4.5 with Suhosin-Patch (cli) (built: Sep 17 2010 13:41:55)
- Copyright (c) 1997-2009 The PHP Group
- Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
- $ php -i | grep json
- json
- json support => enabled
- json version => 1.2.1
- $ php json_test.php
- INPUT:
- [1,2,3]
- OUTPUT:
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- INPUT:
- {"one":1,"two":2,"three":3}
- OUTPUT:
- object(stdClass)#1 (3) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
- }
- INPUT:
- "1"
- OUTPUT:
- string(1) "1"
- INPUT:
- 1
- OUTPUT:
- int(1)
Add Comment
Please, Sign In to add comment