3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array(1 => "Hello"); var_dump($arr); $x = "fun_arr"; function fun_arr($i) { global $arr; return $arr[i]; } echo $x(1);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HQ1MM
function name:  (null)
number of ops:  10
compiled vars:  !0 = $arr, !1 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
    6     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    9     4        ASSIGN                                                   !1, 'fun_arr'
   16     5        INIT_DYNAMIC_CALL                                        !1
          6        SEND_VAL_EX                                              1
          7        DO_FCALL                                      0  $5      
          8        ECHO                                                     $5
          9      > RETURN                                                   1

Function fun_arr:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HQ1MM
function name:  fun_arr
number of ops:  6
compiled vars:  !0 = $i, !1 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        BIND_GLOBAL                                              !1, 'arr'
   13     2        FETCH_CONSTANT                                   ~2      'i'
          3        FETCH_DIM_R                                      ~3      !1, ~2
          4      > RETURN                                                   ~3
   14     5*     > RETURN                                                   null

End of function fun_arr

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.98 ms | 1395 KiB | 15 Q