3v4l.org

run code in 300+ PHP versions simultaneously
<?php const NL = PHP_EOL; $json = '{ "access_token": "ya29.Il-4B1111", "token_type": "Bearer", "expires_in": 3600, "refresh_token": "1//09uJO5Lo7CFhyCg3333", "scope": "https://www.googleapis.com/auth/fitness.activity.read https://www.googleapis.com/auth/fitness.location.read" }'; $jsonObj = json_decode($json); echo $jsonObj->access_token; echo NL; echo $jsonObj->refresh_token; echo NL; echo $jsonObj->expires_in; echo NL; $jsonArr = json_decode($json, true); echo $jsonArr['access_token']; echo NL; echo $jsonArr['refresh_token']; echo NL; echo $jsonArr['expires_in'];
Output for git.master, git.master_jit, rfc.property-hooks
ya29.Il-4B1111 1//09uJO5Lo7CFhyCg3333 3600 ya29.Il-4B1111 1//09uJO5Lo7CFhyCg3333 3600

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:
56.9 ms | 401 KiB | 8 Q