Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ cat a.json
- {"Scientists Extend Einstein's ...... }}
- $ cat a.php
- <?php
- // This doesnt't work:
- // echo json_decode(file_get_contents("a.json"))
- print_r(json_decode(file_get_contents("a.json")));
- ?>
- $ php --version
- PHP 5.5.3-1ubuntu2.1 (cli) (built: Dec 12 2013 04:24:35)
- Copyright (c) 1997-2013 The PHP Group
- Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
- with Zend OPcache v7.0.3-dev, Copyright (c) 1999-2013, by Zend Technologies
- $ php a.php
- stdClass Object
- (
- [Scientists Extend Einstein's Relativity to the Universe's First Moments. January 9 . Fairly Simple Math Could Bridge Quantum Mechanics and General Relativity.] => stdClass Object
- (
- [39] => 4
- [9] => 3
- [Universe&#] => 4
- [Extend] => 2
- [fairli] => 2
- [Could] => 3
- [Bridg] => 3
- [Moment] => 2
- [.] => 1
- [to] => 3
- [s] => 2
- [scientist] => 3
- [Rel] => 3
- [Einstein&#] => 2
- [januari] => 2
- [;] => 1
- [Simpl] => 3
- [the] => 4
- [Math] => 3
- [First] => 2
- )
- .........
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement