3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(-1); phpversion() >= "5.6.0" or die(); $a = 1; unset($a); $g = array_filter($GLOBALS, function($k) { return !in_array($k, ["g", "HTTP_RAW_POST_DATA", "GLOBALS", "_FILES", "_REQUEST", "_SESSION", "_ENV", "_SERVER", "_GET", "_POST", "_COOKIE", "argv", "argc"]); }, ARRAY_FILTER_USE_KEY); var_dump(count($g)); var_dump($g); var_dump(array_keys($g)); var_dump($g['a']);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hVcAB
function name:  (null)
number of ops:  37
compiled vars:  !0 = $a, !1 = $g
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 -1
          2        DO_ICALL                                                 
    3     3        INIT_FCALL                                               'phpversion'
          4        DO_ICALL                                         $3      
          5        IS_SMALLER_OR_EQUAL                              ~4      '5.6.0', $3
          6      > JMPNZ_EX                                         ~4      ~4, ->9
          7    > > EXIT                                                     
          8*       BOOL                                             ~4      <true>
    5     9    >   ASSIGN                                                   !0, 1
    6    10        UNSET_CV                                                 !0
    8    11        INIT_FCALL                                               'array_filter'
         12        FETCH_R                      global              ~6      'GLOBALS'
         13        SEND_VAL                                                 ~6
         14        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FhVcAB%3A8%240'
   10    15        SEND_VAL                                                 ~7
         16        SEND_VAL                                                 2
         17        DO_ICALL                                         $8      
    8    18        ASSIGN                                                   !1, $8
   11    19        INIT_FCALL                                               'var_dump'
         20        COUNT                                            ~10     !1
         21        SEND_VAL                                                 ~10
         22        DO_ICALL                                                 
   12    23        INIT_FCALL                                               'var_dump'
         24        SEND_VAR                                                 !1
         25        DO_ICALL                                                 
   13    26        INIT_FCALL                                               'var_dump'
         27        INIT_FCALL                                               'array_keys'
         28        SEND_VAR                                                 !1
         29        DO_ICALL                                         $13     
         30        SEND_VAR                                                 $13
         31        DO_ICALL                                                 
   15    32        INIT_FCALL                                               'var_dump'
         33        FETCH_DIM_R                                      ~15     !1, 'a'
         34        SEND_VAL                                                 ~15
         35        DO_ICALL                                                 
         36      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FhVcAB%3A8%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hVcAB
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        IN_ARRAY                                         ~1      !0, <array>
          2        BOOL_NOT                                         ~2      ~1
          3      > RETURN                                                   ~2
   10     4*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FhVcAB%3A8%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.22 ms | 1400 KiB | 23 Q