3v4l.org

run code in 300+ PHP versions simultaneously
<?php function scope () { static $globals = null; if($globals === null) $globals = array( '_SERVER' => &$_SERVER, '_ENV' => &$_ENV, '_REQUEST' => &$_REQUEST, '_GET' => &$_GET, '_POST' => &$_POST, '_COOKIE' => &$_COOKIE, '_FILES' => &$_FILES, '_CUSTOM' => &$_CUSTOM ); var_dump($globals); } scope(); $_POST = null; scope();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VIvW9
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   INIT_FCALL                                               'scope'
          1        DO_FCALL                                      0          
   22     2        FETCH_W                      global              $1      '_POST'
          3        ASSIGN                                                   $1, null
   23     4        INIT_FCALL                                               'scope'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Function scope:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 19
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/VIvW9
function name:  scope
number of ops:  23
compiled vars:  !0 = $globals, !1 = $_CUSTOM
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   BIND_STATIC                                              !0
    7     1        TYPE_CHECK                                    2          !0
          2      > JMPZ                                                     ~2, ->19
    8     3    >   FETCH_W                      global              $3      '_SERVER'
          4        INIT_ARRAY                                       ~4      $3, '_SERVER'
    9     5        FETCH_W                      global              $5      '_ENV'
          6        ADD_ARRAY_ELEMENT                                ~4      $5, '_ENV'
   10     7        FETCH_W                      global              $6      '_REQUEST'
          8        ADD_ARRAY_ELEMENT                                ~4      $6, '_REQUEST'
   11     9        FETCH_W                      global              $7      '_GET'
         10        ADD_ARRAY_ELEMENT                                ~4      $7, '_GET'
   12    11        FETCH_W                      global              $8      '_POST'
         12        ADD_ARRAY_ELEMENT                                ~4      $8, '_POST'
   13    13        FETCH_W                      global              $9      '_COOKIE'
         14        ADD_ARRAY_ELEMENT                                ~4      $9, '_COOKIE'
   14    15        FETCH_W                      global              $10     '_FILES'
         16        ADD_ARRAY_ELEMENT                                ~4      $10, '_FILES'
   15    17        ADD_ARRAY_ELEMENT                                ~4      !1, '_CUSTOM'
    7    18        ASSIGN                                                   !0, ~4
   18    19    >   INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                                 
   19    22      > RETURN                                                   null

End of function scope

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.36 ms | 1399 KiB | 17 Q