3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.33 ms | 1400 KiB | 23 Q