3v4l.org

run code in 300+ PHP versions simultaneously
<?php $variable= "78"; $elem = [$variable=>'Res',78=>'Chan']; print gettype($variable); var_dump($elem); print $elem["78"];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Cekkp
function name:  (null)
number of ops:  12
compiled vars:  !0 = $variable, !1 = $elem
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '78'
    4     1        INIT_ARRAY                                       ~3      'Res', !0
          2        ADD_ARRAY_ELEMENT                                ~3      'Chan', 78
          3        ASSIGN                                                   !1, ~3
    5     4        GET_TYPE                                         ~5      !0
          5        ECHO                                                     ~5
    6     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
    7     9        FETCH_DIM_R                                      ~7      !1, 78
         10        ECHO                                                     ~7
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.94 ms | 1394 KiB | 15 Q