3v4l.org

run code in 300+ PHP versions simultaneously
<?php foreach(get_defined_vars()as $key => $v) { unset($GLOBALS[$key]); } unset($key, $v); $a=5; $b = 6; 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/lG7T6
function name:  (null)
number of ops:  28
compiled vars:  !0 = $v, !1 = $key, !2 = $a, !3 = $b, !4 = $vars
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'get_defined_vars'
          1        DO_ICALL                                         $5      
          2      > FE_RESET_R                                       $6      $5, ->8
          3    > > FE_FETCH_R                                       ~7      $6, !0, ->8
          4    >   ASSIGN                                                   !1, ~7
    6     5        FETCH_UNSET                                      $9      'GLOBALS'
          6        UNSET_DIM                                                $9, !1
    4     7      > JMP                                                      ->3
          8    >   FE_FREE                                                  $6
    8     9        UNSET_CV                                                 !1
         10        UNSET_CV                                                 !0
   11    11        ASSIGN                                                   !2, 5
   12    12        ASSIGN                                                   !3, 6
   14    13        INIT_FCALL                                               'var_dump'
         14        INIT_FCALL                                               'get_defined_vars'
         15        DO_ICALL                                         $12     
         16        SEND_VAR                                                 $12
         17        DO_ICALL                                                 
   16    18        ASSIGN                                                   !3, <array>
   17    19        INIT_FCALL                                               'array_slice'
         20        SEND_VAR                                                 !3
         21        SEND_VAL                                                 1
         22        DO_ICALL                                         $15     
         23        ASSIGN                                                   !4, $15
   18    24        INIT_FCALL                                               'var_dump'
         25        SEND_VAR                                                 !4
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.59 ms | 1395 KiB | 19 Q