3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = <<<'EOL' { "syndicate-to": [ { "uid": "https://myfavoritesocialnetwork.example/aaronpk", "name": "aaronpk on myfavoritesocialnetwork", "service": { "name": "My Favorite Social Network", "url": "https://myfavoritesocialnetwork.example/", "photo": "https://myfavoritesocialnetwork.example/img/icon.png" }, "user": { "name": "aaronpk", "url": "https://myfavoritesocialnetwork.example/aaronpk", "photo": "https://myfavoritesocialnetwork.example/aaronpk/photo.jpg" } } ] } EOL; $data = json_decode($json); var_dump($data); var_dump(json_last_error()); var_dump($data->{'syndicate-to'}[0]->uid);

preferences:
24.06 ms | 406 KiB | 5 Q