3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo $j = count(get_defined_vars()); $a=8; $b=['b','mm']; $a='pppppppppppppppp'; $k = get_defined_vars(); $vars=array_slice($k, $j + 1); $class = 'class Settings {\n'; foreach($vars as $key => $var) { if(is_array($var)) { $var = serialize($var); } $settings[strtoupper($key)] = $var; $class .= 'const '.strtoupper($key).'='.$var.'\n'; unset($$key); } echo $a; var_dump($settings); echo($class . '}\n');
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 19, Position 2 = 42
Branch analysis from position: 19
2 jumps found. (Code = 78) Position 1 = 20, Position 2 = 42
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 27
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 27
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 42
filename:       /in/GVAOn
function name:  (null)
number of ops:  50
compiled vars:  !0 = $j, !1 = $a, !2 = $b, !3 = $k, !4 = $vars, !5 = $class, !6 = $var, !7 = $key, !8 = $settings
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'get_defined_vars'
          1        DO_ICALL                                         $9      
          2        COUNT                                            ~10     $9
          3        ASSIGN                                           ~11     !0, ~10
          4        ECHO                                                     ~11
    5     5        ASSIGN                                                   !1, 8
    6     6        ASSIGN                                                   !2, <array>
    7     7        ASSIGN                                                   !1, 'pppppppppppppppp'
    9     8        INIT_FCALL                                               'get_defined_vars'
          9        DO_ICALL                                         $15     
         10        ASSIGN                                                   !3, $15
   10    11        INIT_FCALL                                               'array_slice'
         12        SEND_VAR                                                 !3
         13        ADD                                              ~17     !0, 1
         14        SEND_VAL                                                 ~17
         15        DO_ICALL                                         $18     
         16        ASSIGN                                                   !4, $18
   15    17        ASSIGN                                                   !5, 'class+Settings+%7B%5Cn'
   18    18      > FE_RESET_R                                       $21     !4, ->42
         19    > > FE_FETCH_R                                       ~22     $21, !6, ->42
         20    >   ASSIGN                                                   !7, ~22
   20    21        TYPE_CHECK                                  128          !6
         22      > JMPZ                                                     ~24, ->27
   21    23    >   INIT_FCALL                                               'serialize'
         24        SEND_VAR                                                 !6
         25        DO_ICALL                                         $25     
         26        ASSIGN                                                   !6, $25
   23    27    >   INIT_FCALL                                               'strtoupper'
         28        SEND_VAR                                                 !7
         29        DO_ICALL                                         $27     
         30        ASSIGN_DIM                                               !8, $27
         31        OP_DATA                                                  !6
   25    32        INIT_FCALL                                               'strtoupper'
         33        SEND_VAR                                                 !7
         34        DO_ICALL                                         $29     
         35        CONCAT                                           ~30     'const+', $29
         36        CONCAT                                           ~31     ~30, '%3D'
         37        CONCAT                                           ~32     ~31, !6
         38        CONCAT                                           ~33     ~32, '%5Cn'
         39        ASSIGN_OP                                     8          !5, ~33
   26    40        UNSET_VAR                                                !7
   18    41      > JMP                                                      ->19
         42    >   FE_FREE                                                  $21
   30    43        ECHO                                                     !1
   32    44        INIT_FCALL                                               'var_dump'
         45        SEND_VAR                                                 !8
         46        DO_ICALL                                                 
   35    47        CONCAT                                           ~36     !5, '%7D%5Cn'
         48        ECHO                                                     ~36
         49      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.8 ms | 1400 KiB | 23 Q