3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json='{"0":{"role_id":1,"username":"me@gmail.com","date_time":"2013-01-13 14:01:00"},"status":"success"}'; $obj=json_decode($json); var_dump($obj); var_dump($obj->{"0"}->username);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6RnGP
function name:  (null)
number of ops:  14
compiled vars:  !0 = $json, !1 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%7B%220%22%3A%7B%22role_id%22%3A1%2C%22username%22%3A%22me%40gmail.com%22%2C%22date_time%22%3A%222013-01-13+14%3A01%3A00%22%7D%2C%22status%22%3A%22success%22%7D'
    3     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !1, $3
    4     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
    5     8        INIT_FCALL                                               'var_dump'
          9        FETCH_OBJ_R                                      ~6      !1, '0'
         10        FETCH_OBJ_R                                      ~7      ~6, 'username'
         11        SEND_VAL                                                 ~7
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
228.7 ms | 1398 KiB | 17 Q