3v4l.org

run code in 300+ PHP versions simultaneously
<?php foreach(get_defined_vars()as $key => $v) { unset($GLOBALS[$key]); } unset($key, $v); var_dump(get_defined_vars()); $b=['1','2',3,4,5,6,7,8]; $vars=array_slice($b, 1); var_dump($vars);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/luHhv
function name:  (null)
number of ops:  26
compiled vars:  !0 = $v, !1 = $key, !2 = $b, !3 = $vars
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'get_defined_vars'
          1        DO_ICALL                                         $4      
          2      > FE_RESET_R                                       $5      $4, ->8
          3    > > FE_FETCH_R                                       ~6      $5, !0, ->8
          4    >   ASSIGN                                                   !1, ~6
    6     5        FETCH_UNSET                                      $8      'GLOBALS'
          6        UNSET_DIM                                                $8, !1
    4     7      > JMP                                                      ->3
          8    >   FE_FREE                                                  $5
    8     9        UNSET_CV                                                 !1
         10        UNSET_CV                                                 !0
   10    11        INIT_FCALL                                               'var_dump'
         12        INIT_FCALL                                               'get_defined_vars'
         13        DO_ICALL                                         $9      
         14        SEND_VAR                                                 $9
         15        DO_ICALL                                                 
   12    16        ASSIGN                                                   !2, <array>
   13    17        INIT_FCALL                                               'array_slice'
         18        SEND_VAR                                                 !2
         19        SEND_VAL                                                 1
         20        DO_ICALL                                         $12     
         21        ASSIGN                                                   !3, $12
   14    22        INIT_FCALL                                               'var_dump'
         23        SEND_VAR                                                 !3
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.42 ms | 1395 KiB | 19 Q