3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(get_defined_vars()); echo $j = count(get_defined_vars()); $a=8; $b=['b','mm']; $a='pppppppppppppppp'; $k = get_defined_vars(); $vars=array_slice($k, $j + 0); $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 = 24, Position 2 = 47
Branch analysis from position: 24
2 jumps found. (Code = 78) Position 1 = 25, Position 2 = 47
Branch analysis from position: 25
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 32
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
Branch analysis from position: 32
Branch analysis from position: 47
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 47
filename:       /in/vkLDI
function name:  (null)
number of ops:  55
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
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'get_defined_vars'
          2        DO_ICALL                                         $9      
          3        SEND_VAR                                                 $9
          4        DO_ICALL                                                 
    3     5        INIT_FCALL                                               'get_defined_vars'
          6        DO_ICALL                                         $11     
          7        COUNT                                            ~12     $11
          8        ASSIGN                                           ~13     !0, ~12
          9        ECHO                                                     ~13
    5    10        ASSIGN                                                   !1, 8
    6    11        ASSIGN                                                   !2, <array>
    7    12        ASSIGN                                                   !1, 'pppppppppppppppp'
    9    13        INIT_FCALL                                               'get_defined_vars'
         14        DO_ICALL                                         $17     
         15        ASSIGN                                                   !3, $17
   10    16        INIT_FCALL                                               'array_slice'
         17        SEND_VAR                                                 !3
         18        ADD                                              ~19     !0, 0
         19        SEND_VAL                                                 ~19
         20        DO_ICALL                                         $20     
         21        ASSIGN                                                   !4, $20
   15    22        ASSIGN                                                   !5, 'class+Settings+%7B%5Cn'
   18    23      > FE_RESET_R                                       $23     !4, ->47
         24    > > FE_FETCH_R                                       ~24     $23, !6, ->47
         25    >   ASSIGN                                                   !7, ~24
   20    26        TYPE_CHECK                                  128          !6
         27      > JMPZ                                                     ~26, ->32
   21    28    >   INIT_FCALL                                               'serialize'
         29        SEND_VAR                                                 !6
         30        DO_ICALL                                         $27     
         31        ASSIGN                                                   !6, $27
   23    32    >   INIT_FCALL                                               'strtoupper'
         33        SEND_VAR                                                 !7
         34        DO_ICALL                                         $29     
         35        ASSIGN_DIM                                               !8, $29
         36        OP_DATA                                                  !6
   25    37        INIT_FCALL                                               'strtoupper'
         38        SEND_VAR                                                 !7
         39        DO_ICALL                                         $31     
         40        CONCAT                                           ~32     'const+', $31
         41        CONCAT                                           ~33     ~32, '%3D'
         42        CONCAT                                           ~34     ~33, !6
         43        CONCAT                                           ~35     ~34, '%5Cn'
         44        ASSIGN_OP                                     8          !5, ~35
   26    45        UNSET_VAR                                                !7
   18    46      > JMP                                                      ->24
         47    >   FE_FREE                                                  $23
   30    48        ECHO                                                     !1
   32    49        INIT_FCALL                                               'var_dump'
         50        SEND_VAR                                                 !8
         51        DO_ICALL                                                 
   35    52        CONCAT                                           ~38     !5, '%7D%5Cn'
         53        ECHO                                                     ~38
         54      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.81 ms | 1400 KiB | 23 Q