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);
Output for git.master, git.master_jit, rfc.property-hooks
object(stdClass)#4 (1) { ["syndicate-to"]=> array(1) { [0]=> object(stdClass)#1 (4) { ["uid"]=> string(47) "https://myfavoritesocialnetwork.example/aaronpk" ["name"]=> string(34) "aaronpk on myfavoritesocialnetwork" ["service"]=> object(stdClass)#2 (3) { ["name"]=> string(26) "My Favorite Social Network" ["url"]=> string(40) "https://myfavoritesocialnetwork.example/" ["photo"]=> string(52) "https://myfavoritesocialnetwork.example/img/icon.png" } ["user"]=> object(stdClass)#3 (3) { ["name"]=> string(7) "aaronpk" ["url"]=> string(47) "https://myfavoritesocialnetwork.example/aaronpk" ["photo"]=> string(57) "https://myfavoritesocialnetwork.example/aaronpk/photo.jpg" } } } } int(0) string(47) "https://myfavoritesocialnetwork.example/aaronpk"

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
28.39 ms | 408 KiB | 5 Q