3v4l.org

run code in 500+ PHP versions simultaneously
<?php $arr['var1'] = 'Hello'; $arr['var2'] = 'world'; function foo(){ unset($GLOBALS['arr']['var2']); } var_dump($arr); foo(); var_dump($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rCN5h
function name:  (null)
number of ops:  13
compiled vars:  !0 = $arr
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN_DIM                                                   !0, 'var1'
          1        OP_DATA                                                      'Hello'
    3     2        ASSIGN_DIM                                                   !0, 'var2'
          3        OP_DATA                                                      'world'
    7     4        INIT_FCALL                                                   'var_dump'
          5        SEND_VAR                                                     !0
          6        DO_ICALL                                                     
    8     7        INIT_FCALL                                                   'foo'
          8        DO_FCALL                                          0          
    9     9        INIT_FCALL                                                   'var_dump'
         10        SEND_VAR                                                     !0
         11        DO_ICALL                                                     
         12      > RETURN                                                       1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rCN5h
function name:  foo
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   FETCH_UNSET                                          $0      'arr'
          1        UNSET_DIM                                                    $0, 'var2'
    6     2      > RETURN                                                       null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
161.22 ms | 2964 KiB | 15 Q