3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.21 ms | 1405 KiB | 23 Q