3v4l.org

run code in 300+ PHP versions simultaneously
<?php const NL = PHP_EOL; $json = rtrim('{ "access_token": "ya29.Il-4B7Tpewa", "token_type": "Bearer", "expires_in": 3600, "refresh_token": "1//09ghRt", "scope": "https://www.googleapis.com/auth/fitness.location.read https://www.googleapis.com/auth/fitness.activity.read" } 1', ' 1'); $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-4B7Tpewa 1//09ghRt 3600 ya29.Il-4B7Tpewa 1//09ghRt 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:
66.57 ms | 401 KiB | 8 Q