3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(!defined('GLPI_ROOT')) define('GLPI_ROOT', "../.."); function plugin_portswitch_install() { include_once( GLPI_ROOT."/plugins/portswitch/portswitch.class.php"); if(!(is_dir(GLPI_ROOT."/files/_plugins/portswitch"))) if(!(mkdir(GLPI_ROOT."/files/_plugins/portswitch"))) die("Konnte ".GLPI_ROOT."/files/_plugins/portswitch nicht erstellen."); PluginPortswitchPortswitch::$config_data[0]['name'] = "Name"; PluginPortswitchPortswitch::$config_data[0]['ip'] = "0.0.0.0"; PluginPortswitchPortswitch::$config_data[0]['port'] = "0"; PluginPortswitchPortswitch::$config_data[0]['kommentar'] = ""; PluginPortswitchPortswitch::$config_data[0]['status'] = "Unbekannt"; PluginPortswitchPortswitch::$config_data[0]['passwort'] = "Passwort"; PluginPortswitchPortswitch::$config_data[0]['stack'] = "0"; PluginPortswitchPortswitch::$config_data[0]['hostname'] = ""; PluginPortswitchPortswitch::saveConfig(); return true; } function plugin_portswitch_uninstall() { if(file_exists(GLPI_ROOT."/files/_plugins/portswitch/config.ini")) unlink(GLPI_ROOT."/files/_plugins/portswitch/config.ini"); if(is_dir(GLPI_ROOT."/files/_plugins/portswitch")) rmdir(GLPI_ROOT."/files/_plugins/portswitch"); return true; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/auOuQ
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DEFINED                                          ~0      'GLPI_ROOT'
          1        BOOL_NOT                                         ~1      ~0
          2      > JMPZ                                                     ~1, ->7
    3     3    >   INIT_FCALL                                               'define'
          4        SEND_VAL                                                 'GLPI_ROOT'
          5        SEND_VAL                                                 '..%2F..'
          6        DO_ICALL                                                 
   38     7    > > RETURN                                                   1

Function plugin_portswitch_install:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 21
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 21
Branch analysis from position: 17
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/auOuQ
function name:  plugin_portswitch_install
number of ops:  57
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FETCH_CONSTANT                                   ~0      'GLPI_ROOT'
          1        CONCAT                                           ~1      ~0, '%2Fplugins%2Fportswitch%2Fportswitch.class.php'
          2        INCLUDE_OR_EVAL                                          ~1, INCLUDE_ONCE
    9     3        INIT_FCALL                                               'is_dir'
          4        FETCH_CONSTANT                                   ~3      'GLPI_ROOT'
          5        CONCAT                                           ~4      ~3, '%2Ffiles%2F_plugins%2Fportswitch'
          6        SEND_VAL                                                 ~4
          7        DO_ICALL                                         $5      
          8        BOOL_NOT                                         ~6      $5
          9      > JMPZ                                                     ~6, ->21
   10    10    >   INIT_FCALL                                               'mkdir'
         11        FETCH_CONSTANT                                   ~7      'GLPI_ROOT'
         12        CONCAT                                           ~8      ~7, '%2Ffiles%2F_plugins%2Fportswitch'
         13        SEND_VAL                                                 ~8
         14        DO_ICALL                                         $9      
         15        BOOL_NOT                                         ~10     $9
         16      > JMPZ                                                     ~10, ->21
   11    17    >   FETCH_CONSTANT                                   ~11     'GLPI_ROOT'
         18        CONCAT                                           ~12     'Konnte+', ~11
         19        CONCAT                                           ~13     ~12, '%2Ffiles%2F_plugins%2Fportswitch+nicht+erstellen.'
         20      > EXIT                                                     ~13
   13    21    >   FETCH_STATIC_PROP_W          unknown             $14     'config_data'
         22        FETCH_DIM_W                                      $15     $14, 0
         23        ASSIGN_DIM                                               $15, 'name'
         24        OP_DATA                                                  'Name'
   14    25        FETCH_STATIC_PROP_W          unknown             $17     'config_data'
         26        FETCH_DIM_W                                      $18     $17, 0
         27        ASSIGN_DIM                                               $18, 'ip'
         28        OP_DATA                                                  '0.0.0.0'
   15    29        FETCH_STATIC_PROP_W          unknown             $20     'config_data'
         30        FETCH_DIM_W                                      $21     $20, 0
         31        ASSIGN_DIM                                               $21, 'port'
         32        OP_DATA                                                  '0'
   16    33        FETCH_STATIC_PROP_W          unknown             $23     'config_data'
         34        FETCH_DIM_W                                      $24     $23, 0
         35        ASSIGN_DIM                                               $24, 'kommentar'
         36        OP_DATA                                                  ''
   17    37        FETCH_STATIC_PROP_W          unknown             $26     'config_data'
         38        FETCH_DIM_W                                      $27     $26, 0
         39        ASSIGN_DIM                                               $27, 'status'
         40        OP_DATA                                                  'Unbekannt'
   18    41        FETCH_STATIC_PROP_W          unknown             $29     'config_data'
         42        FETCH_DIM_W                                      $30     $29, 0
         43        ASSIGN_DIM                                               $30, 'passwort'
         44        OP_DATA                                                  'Passwort'
   19    45        FETCH_STATIC_PROP_W          unknown             $32     'config_data'
         46        FETCH_DIM_W                                      $33     $32, 0
         47        ASSIGN_DIM                                               $33, 'stack'
         48        OP_DATA                                                  '0'
   20    49        FETCH_STATIC_PROP_W          unknown             $35     'config_data'
         50        FETCH_DIM_W                                      $36     $35, 0
         51        ASSIGN_DIM                                               $36, 'hostname'
         52        OP_DATA                                                  ''
   22    53        INIT_STATIC_METHOD_CALL                                  'PluginPortswitchPortswitch', 'saveConfig'
         54        DO_FCALL                                      0          
   24    55      > RETURN                                                   <true>
   25    56*     > RETURN                                                   null

End of function plugin_portswitch_install

Function plugin_portswitch_uninstall:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 11
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 22
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
Branch analysis from position: 11
filename:       /in/auOuQ
function name:  plugin_portswitch_uninstall
number of ops:  24
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   INIT_FCALL                                               'file_exists'
          1        FETCH_CONSTANT                                   ~0      'GLPI_ROOT'
          2        CONCAT                                           ~1      ~0, '%2Ffiles%2F_plugins%2Fportswitch%2Fconfig.ini'
          3        SEND_VAL                                                 ~1
          4        DO_ICALL                                         $2      
          5      > JMPZ                                                     $2, ->11
   30     6    >   INIT_FCALL                                               'unlink'
          7        FETCH_CONSTANT                                   ~3      'GLPI_ROOT'
          8        CONCAT                                           ~4      ~3, '%2Ffiles%2F_plugins%2Fportswitch%2Fconfig.ini'
          9        SEND_VAL                                                 ~4
         10        DO_ICALL                                                 
   32    11    >   INIT_FCALL                                               'is_dir'
         12        FETCH_CONSTANT                                   ~6      'GLPI_ROOT'
         13        CONCAT                                           ~7      ~6, '%2Ffiles%2F_plugins%2Fportswitch'
         14        SEND_VAL                                                 ~7
         15        DO_ICALL                                         $8      
         16      > JMPZ                                                     $8, ->22
   33    17    >   INIT_FCALL                                               'rmdir'
         18        FETCH_CONSTANT                                   ~9      'GLPI_ROOT'
         19        CONCAT                                           ~10     ~9, '%2Ffiles%2F_plugins%2Fportswitch'
         20        SEND_VAL                                                 ~10
         21        DO_ICALL                                                 
   35    22    > > RETURN                                                   <true>
   36    23*     > RETURN                                                   null

End of function plugin_portswitch_uninstall

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
185.45 ms | 1404 KiB | 25 Q