3v4l.org

run code in 300+ PHP versions simultaneously
<?php function main() { $g = $GLOBALS; foreach (array_keys($GLOBALS) as $k) { unset($GLOBALS[$k]); } var_dump($g); var_dump((bool)$g); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FKDLh
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E > > RETURN                                                   1

Function main:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 11
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 11
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/FKDLh
function name:  main
number of ops:  20
compiled vars:  !0 = $g, !1 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   FETCH_R                      global              ~2      'GLOBALS'
          1        ASSIGN                                                   !0, ~2
    5     2        INIT_FCALL                                               'array_keys'
          3        FETCH_R                      global              ~4      'GLOBALS'
          4        SEND_VAL                                                 ~4
          5        DO_ICALL                                         $5      
          6      > FE_RESET_R                                       $6      $5, ->11
          7    > > FE_FETCH_R                                               $6, !1, ->11
    6     8    >   FETCH_UNSET                                      $7      'GLOBALS'
          9        UNSET_DIM                                                $7, !1
    5    10      > JMP                                                      ->7
         11    >   FE_FREE                                                  $6
    9    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                                 
   10    15        INIT_FCALL                                               'var_dump'
         16        BOOL                                             ~9      !0
         17        SEND_VAL                                                 ~9
         18        DO_ICALL                                                 
   11    19      > RETURN                                                   null

End of function main

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.79 ms | 1395 KiB | 17 Q