3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = (array)(json_decode('{"4":"Taaaaa"}')); $key = "4"; var_dump($key, $array, $array[(string)$key]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/h1d3X
function name:  (null)
number of ops:  14
compiled vars:  !0 = $array, !1 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'json_decode'
          1        SEND_VAL                                                 '%7B%224%22%3A%22Taaaaa%22%7D'
          2        DO_ICALL                                         $2      
          3        CAST                                          7  ~3      $2
          4        ASSIGN                                                   !0, ~3
    4     5        ASSIGN                                                   !1, '4'
    7     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !1
          8        SEND_VAR                                                 !0
          9        CAST                                          6  ~6      !1
         10        FETCH_DIM_R                                      ~7      !0, ~6
         11        SEND_VAL                                                 ~7
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.65 ms | 1385 KiB | 17 Q