3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = '{"123":"456"}'; $arr = json_deocde($json, true); $obj = (object)$arr; var_dump($arr['123']); var_dump($obj->{'123'});
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HoNN4
function name:  (null)
number of ops:  17
compiled vars:  !0 = $test, !1 = $arr, !2 = $json, !3 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7B%22123%22%3A%22456%22%7D'
    4     1        INIT_FCALL_BY_NAME                                       'json_deocde'
          2        SEND_VAR_EX                                              !2
          3        SEND_VAL_EX                                              <true>
          4        DO_FCALL                                      0  $5      
          5        ASSIGN                                                   !1, $5
    5     6        CAST                                          8  ~7      !1
          7        ASSIGN                                                   !3, ~7
    7     8        INIT_FCALL                                               'var_dump'
          9        FETCH_DIM_R                                      ~9      !1, 123
         10        SEND_VAL                                                 ~9
         11        DO_ICALL                                                 
    8    12        INIT_FCALL                                               'var_dump'
         13        FETCH_OBJ_R                                      ~11     !3, '123'
         14        SEND_VAL                                                 ~11
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.94 ms | 1394 KiB | 15 Q