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'];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aCJt6
function name:  (null)
number of ops:  38
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        INIT_FCALL                                               'rtrim'
          2        SEND_VAL                                                 '%7B+%0A++++%22access_token%22%3A+%22ya29.Il-4B7Tpewa%22%2C+%0A++++%22token_type%22%3A+%22Bearer%22%2C%0A++++%22expires_in%22%3A+3600%2C%0A++++%22refresh_token%22%3A+%221%2F%2F09ghRt%22%2C%0A++++%22scope%22%3A+%22https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ffitness.location.read+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ffitness.activity.read%22+%7D+1'
    9     3        SEND_VAL                                                 '+1'
          4        DO_ICALL                                         $3      
    4     5        ASSIGN                                                   !0, $3
   12     6        INIT_FCALL                                               'json_decode'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $5      
          9        ASSIGN                                                   !1, $5
   13    10        FETCH_OBJ_R                                      ~7      !1, 'access_token'
         11        ECHO                                                     ~7
   14    12        FETCH_CONSTANT                                   ~8      'NL'
         13        ECHO                                                     ~8
   15    14        FETCH_OBJ_R                                      ~9      !1, 'refresh_token'
         15        ECHO                                                     ~9
   16    16        FETCH_CONSTANT                                   ~10     'NL'
         17        ECHO                                                     ~10
   17    18        FETCH_OBJ_R                                      ~11     !1, 'expires_in'
         19        ECHO                                                     ~11
   18    20        FETCH_CONSTANT                                   ~12     'NL'
         21        ECHO                                                     ~12
   20    22        INIT_FCALL                                               'json_decode'
         23        SEND_VAR                                                 !0
         24        SEND_VAL                                                 <true>
         25        DO_ICALL                                         $13     
         26        ASSIGN                                                   !2, $13
   21    27        FETCH_DIM_R                                      ~15     !2, 'access_token'
         28        ECHO                                                     ~15
   22    29        FETCH_CONSTANT                                   ~16     'NL'
         30        ECHO                                                     ~16
   23    31        FETCH_DIM_R                                      ~17     !2, 'refresh_token'
         32        ECHO                                                     ~17
   24    33        FETCH_CONSTANT                                   ~18     'NL'
         34        ECHO                                                     ~18
   25    35        FETCH_DIM_R                                      ~19     !2, 'expires_in'
         36        ECHO                                                     ~19
         37      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.92 ms | 1396 KiB | 17 Q