3v4l.org

run code in 300+ PHP versions simultaneously
<?php foreach(get_defined_vars()as $key => $v) { unset($GLOBALS[$key]); } $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/RTklD
function name:  (null)
number of ops:  19
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
   10     9        ASSIGN                                                   !2, <array>
   11    10        INIT_FCALL                                               'array_slice'
         11        SEND_VAR                                                 !2
         12        SEND_VAL                                                 1
         13        DO_ICALL                                         $10     
         14        ASSIGN                                                   !3, $10
   12    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.89 ms | 1399 KiB | 19 Q