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'];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AmnqN
function name:  (null)
number of ops:  34
compiled vars:  !0 = $json, !1 = $jsonObj, !2 = $jsonArr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_CONST                                            'NL', '%0A'
    4     1        ASSIGN                                                   !0, '%7B%0A++++%22access_token%22%3A+%22ya29.Il-4B1111%22%2C%0A%09%22token_type%22%3A+%22Bearer%22%2C%0A%09%22expires_in%22%3A+3600%2C%0A%09%22refresh_token%22%3A+%221%2F%2F09uJO5Lo7CFhyCg3333%22%2C%0A%09%22scope%22%3A+%22https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ffitness.activity.read+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ffitness.location.read%22%0A%7D'
   11     2        INIT_FCALL                                               'json_decode'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
   12     6        FETCH_OBJ_R                                      ~6      !1, 'access_token'
          7        ECHO                                                     ~6
   13     8        FETCH_CONSTANT                                   ~7      'NL'
          9        ECHO                                                     ~7
   14    10        FETCH_OBJ_R                                      ~8      !1, 'refresh_token'
         11        ECHO                                                     ~8
   15    12        FETCH_CONSTANT                                   ~9      'NL'
         13        ECHO                                                     ~9
   16    14        FETCH_OBJ_R                                      ~10     !1, 'expires_in'
         15        ECHO                                                     ~10
   17    16        FETCH_CONSTANT                                   ~11     'NL'
         17        ECHO                                                     ~11
   19    18        INIT_FCALL                                               'json_decode'
         19        SEND_VAR                                                 !0
         20        SEND_VAL                                                 <true>
         21        DO_ICALL                                         $12     
         22        ASSIGN                                                   !2, $12
   20    23        FETCH_DIM_R                                      ~14     !2, 'access_token'
         24        ECHO                                                     ~14
   21    25        FETCH_CONSTANT                                   ~15     'NL'
         26        ECHO                                                     ~15
   22    27        FETCH_DIM_R                                      ~16     !2, 'refresh_token'
         28        ECHO                                                     ~16
   23    29        FETCH_CONSTANT                                   ~17     'NL'
         30        ECHO                                                     ~17
   24    31        FETCH_DIM_R                                      ~18     !2, 'expires_in'
         32        ECHO                                                     ~18
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.74 ms | 1400 KiB | 15 Q