3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Multi instance support was written by Krunch if (!isset($_SESSION['user_id']) || isset($_GET["instance"])) { if (isset($_POST["instance"])) { $serverinstance = intval($_POST["instance"]); } else if (isset($_GET["instance"])) { if ($_GET["instance"] > 0) { $serverinstance = intval($_GET["instance"]); } else { $serverinstance = 1; } } else { $serverinstance = 1; } $_SESSION["serverinstance"] = $serverinstance; $_SESSION["patharma"] = $patharma = realpath(dirname(__FILE__) . "/../../.."); $settings = simplexml_load_file($patharma."\\C:\xampp\htdocs\@dayzcc_config\\$serverinstance\\settings.xml", true); $hive = parse_ini_file($patharma."\\@dayzcc_config\\$serverinstance\\HiveExt.ini", true); $_SESSION["servermodlist"] = $servermodlist = (string)$settings->section[1]->setting[1]; $_SESSION["serverip"] = $serverip = (string)$settings->section[2]->setting[2]; $_SESSION["serverport"] = $serverport = (string)$settings->section[3]->setting[3]; $_SESSION["rconpassword"] = $rconpassword = (string)$settings->section[4]->setting[4]; $_SESSION["dbhost"] = $dbhost = $hive["Database"]["Host"]; $_SESSION["dbport"] = $dbport = $hive["Database"]["Port"]; $_SESSION["dbuser"] = $dbuser = $hive["Database"]["Username"]; $_SESSION["dbpass"] = $dbpass = $hive["Database"]["Password"]; $_SESSION["dbname"] = $dbname = $hive["Database"]["Database"]; $dbh = new mysqli($dbhost.':'.$dbport, $dbuser, $dbpass, $dbname); if ($dbh->connect_errno) { echo $dbh->connect_error; exit; } $sth = $dbh->prepare("select world.name from instance inner join world on instance.world_id = world.id where instance.id = ?"); $sth->bind_param("i", $serverinstance); $sth->execute() or die($sth->error); $sth->bind_result($serverworld); $sth->fetch() or die($sth->error); $sth->close(); $_SESSION["serverworld"] = $serverworld; } else { $serverinstance = $_SESSION["serverinstance"]; $patharma = $_SESSION["patharma"]; $servermodlist = $_SESSION["servermodlist"]; $serverip = $_SESSION["serverip"]; $serverport = $_SESSION["serverport"]; $rconpassword = $_SESSION["rconpassword"]; $dbhost = $_SESSION["dbhost"]; $dbport = $_SESSION["dbport"]; $dbuser = $_SESSION["dbuser"]; $dbpass = $_SESSION["dbpass"]; $dbname = $_SESSION["dbname"]; $serverworld = $_SESSION["serverworld"]; } $sitename = "DayZ Controlcenter (Instance ".$serverinstance.")"; $exeserver = "arma2oaserver_".$serverinstance.".exe"; $pathserver = $patharma."\\@dayzcc_config\\".$serverinstance."\\".$exeserver; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 172
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 16
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
2 jumps found. (Code = 43) Position 1 = 140, Position 2 = 143
Branch analysis from position: 140
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 143
2 jumps found. (Code = 47) Position 1 = 154, Position 2 = 157
Branch analysis from position: 154
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 157
2 jumps found. (Code = 47) Position 1 = 163, Position 2 = 166
Branch analysis from position: 163
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 166
1 jumps found. (Code = 42) Position 1 = 208
Branch analysis from position: 208
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 30
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 28
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
Branch analysis from position: 30
2 jumps found. (Code = 43) Position 1 = 140, Position 2 = 143
Branch analysis from position: 140
Branch analysis from position: 143
Branch analysis from position: 172
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/ne50i
function name:  (null)
number of ops:  220
compiled vars:  !0 = $serverinstance, !1 = $patharma, !2 = $settings, !3 = $hive, !4 = $servermodlist, !5 = $serverip, !6 = $serverport, !7 = $rconpassword, !8 = $dbhost, !9 = $dbport, !10 = $dbuser, !11 = $dbpass, !12 = $dbname, !13 = $dbh, !14 = $sth, !15 = $serverworld, !16 = $sitename, !17 = $exeserver, !18 = $pathserver
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   FETCH_IS                                         ~19     '_SESSION'
          1        ISSET_ISEMPTY_DIM_OBJ                         0  ~20     ~19, 'user_id'
          2        BOOL_NOT                                         ~21     ~20
          3      > JMPNZ_EX                                         ~21     ~21, ->7
          4    >   FETCH_IS                                         ~22     '_GET'
          5        ISSET_ISEMPTY_DIM_OBJ                         0  ~23     ~22, 'instance'
          6        BOOL                                             ~21     ~23
          7    > > JMPZ                                                     ~21, ->172
    7     8    >   FETCH_IS                                         ~24     '_POST'
          9        ISSET_ISEMPTY_DIM_OBJ                         0          ~24, 'instance'
         10      > JMPZ                                                     ~25, ->16
    8    11    >   FETCH_R                      global              ~26     '_POST'
         12        FETCH_DIM_R                                      ~27     ~26, 'instance'
         13        CAST                                          4  ~28     ~27
         14        ASSIGN                                                   !0, ~28
         15      > JMP                                                      ->31
    9    16    >   FETCH_IS                                         ~30     '_GET'
         17        ISSET_ISEMPTY_DIM_OBJ                         0          ~30, 'instance'
         18      > JMPZ                                                     ~31, ->30
   10    19    >   FETCH_R                      global              ~32     '_GET'
         20        FETCH_DIM_R                                      ~33     ~32, 'instance'
         21        IS_SMALLER                                               0, ~33
         22      > JMPZ                                                     ~34, ->28
   11    23    >   FETCH_R                      global              ~35     '_GET'
         24        FETCH_DIM_R                                      ~36     ~35, 'instance'
         25        CAST                                          4  ~37     ~36
         26        ASSIGN                                                   !0, ~37
         27      > JMP                                                      ->29
   13    28    >   ASSIGN                                                   !0, 1
         29    > > JMP                                                      ->31
   16    30    >   ASSIGN                                                   !0, 1
   19    31    >   FETCH_W                      global              $41     '_SESSION'
         32        ASSIGN_DIM                                               $41, 'serverinstance'
         33        OP_DATA                                                  !0
   20    34        INIT_FCALL                                               'realpath'
         35        INIT_FCALL                                               'dirname'
         36        SEND_VAL                                                 '%2Fin%2Fne50i'
         37        DO_ICALL                                         $45     
         38        CONCAT                                           ~46     $45, '%2F..%2F..%2F..'
         39        SEND_VAL                                                 ~46
         40        DO_ICALL                                         $47     
         41        ASSIGN                                           ~48     !1, $47
         42        FETCH_W                      global              $43     '_SESSION'
         43        ASSIGN_DIM                                               $43, 'patharma'
         44        OP_DATA                                                  ~48
   22    45        INIT_FCALL                                               'simplexml_load_file'
         46        ROPE_INIT                                     3  ~50     '%5CC%3A%0Ampp%5Chtdocs%5C%40dayzcc_config%5C'
         47        ROPE_ADD                                      1  ~50     ~50, !0
         48        ROPE_END                                      2  ~49     ~50, '%5Csettings.xml'
         49        CONCAT                                           ~52     !1, ~49
         50        SEND_VAL                                                 ~52
         51        SEND_VAL                                                 <true>
         52        DO_ICALL                                         $53     
         53        ASSIGN                                                   !2, $53
   23    54        INIT_FCALL                                               'parse_ini_file'
         55        ROPE_INIT                                     3  ~56     '%5C%40dayzcc_config%5C'
         56        ROPE_ADD                                      1  ~56     ~56, !0
         57        ROPE_END                                      2  ~55     ~56, '%5CHiveExt.ini'
         58        CONCAT                                           ~58     !1, ~55
         59        SEND_VAL                                                 ~58
         60        SEND_VAL                                                 <true>
         61        DO_ICALL                                         $59     
         62        ASSIGN                                                   !3, $59
   25    63        FETCH_OBJ_R                                      ~63     !2, 'section'
         64        FETCH_DIM_R                                      ~64     ~63, 1
         65        FETCH_OBJ_R                                      ~65     ~64, 'setting'
         66        FETCH_DIM_R                                      ~66     ~65, 1
         67        CAST                                          6  ~67     ~66
         68        ASSIGN                                           ~68     !4, ~67
         69        FETCH_W                      global              $61     '_SESSION'
         70        ASSIGN_DIM                                               $61, 'servermodlist'
         71        OP_DATA                                                  ~68
   26    72        FETCH_OBJ_R                                      ~71     !2, 'section'
         73        FETCH_DIM_R                                      ~72     ~71, 2
         74        FETCH_OBJ_R                                      ~73     ~72, 'setting'
         75        FETCH_DIM_R                                      ~74     ~73, 2
         76        CAST                                          6  ~75     ~74
         77        ASSIGN                                           ~76     !5, ~75
         78        FETCH_W                      global              $69     '_SESSION'
         79        ASSIGN_DIM                                               $69, 'serverip'
         80        OP_DATA                                                  ~76
   27    81        FETCH_OBJ_R                                      ~79     !2, 'section'
         82        FETCH_DIM_R                                      ~80     ~79, 3
         83        FETCH_OBJ_R                                      ~81     ~80, 'setting'
         84        FETCH_DIM_R                                      ~82     ~81, 3
         85        CAST                                          6  ~83     ~82
         86        ASSIGN                                           ~84     !6, ~83
         87        FETCH_W                      global              $77     '_SESSION'
         88        ASSIGN_DIM                                               $77, 'serverport'
         89        OP_DATA                                                  ~84
   28    90        FETCH_OBJ_R                                      ~87     !2, 'section'
         91        FETCH_DIM_R                                      ~88     ~87, 4
         92        FETCH_OBJ_R                                      ~89     ~88, 'setting'
         93        FETCH_DIM_R                                      ~90     ~89, 4
         94        CAST                                          6  ~91     ~90
         95        ASSIGN                                           ~92     !7, ~91
         96        FETCH_W                      global              $85     '_SESSION'
         97        ASSIGN_DIM                                               $85, 'rconpassword'
         98        OP_DATA                                                  ~92
   29    99        FETCH_DIM_R                                      ~95     !3, 'Database'
        100        FETCH_DIM_R                                      ~96     ~95, 'Host'
        101        ASSIGN                                           ~97     !8, ~96
        102        FETCH_W                      global              $93     '_SESSION'
        103        ASSIGN_DIM                                               $93, 'dbhost'
        104        OP_DATA                                                  ~97
   30   105        FETCH_DIM_R                                      ~100    !3, 'Database'
        106        FETCH_DIM_R                                      ~101    ~100, 'Port'
        107        ASSIGN                                           ~102    !9, ~101
        108        FETCH_W                      global              $98     '_SESSION'
        109        ASSIGN_DIM                                               $98, 'dbport'
        110        OP_DATA                                                  ~102
   31   111        FETCH_DIM_R                                      ~105    !3, 'Database'
        112        FETCH_DIM_R                                      ~106    ~105, 'Username'
        113        ASSIGN                                           ~107    !10, ~106
        114        FETCH_W                      global              $103    '_SESSION'
        115        ASSIGN_DIM                                               $103, 'dbuser'
        116        OP_DATA                                                  ~107
   32   117        FETCH_DIM_R                                      ~110    !3, 'Database'
        118        FETCH_DIM_R                                      ~111    ~110, 'Password'
        119        ASSIGN                                           ~112    !11, ~111
        120        FETCH_W                      global              $108    '_SESSION'
        121        ASSIGN_DIM                                               $108, 'dbpass'
        122        OP_DATA                                                  ~112
   33   123        FETCH_DIM_R                                      ~115    !3, 'Database'
        124        FETCH_DIM_R                                      ~116    ~115, 'Database'
        125        ASSIGN                                           ~117    !12, ~116
        126        FETCH_W                      global              $113    '_SESSION'
        127        ASSIGN_DIM                                               $113, 'dbname'
        128        OP_DATA                                                  ~117
   35   129        NEW                                              $118    'mysqli'
        130        CONCAT                                           ~119    !8, '%3A'
        131        CONCAT                                           ~120    ~119, !9
        132        SEND_VAL_EX                                              ~120
        133        SEND_VAR_EX                                              !10
        134        SEND_VAR_EX                                              !11
        135        SEND_VAR_EX                                              !12
        136        DO_FCALL                                      0          
        137        ASSIGN                                                   !13, $118
   37   138        FETCH_OBJ_R                                      ~123    !13, 'connect_errno'
        139      > JMPZ                                                     ~123, ->143
   38   140    >   FETCH_OBJ_R                                      ~124    !13, 'connect_error'
        141        ECHO                                                     ~124
   39   142      > EXIT                                                     
   42   143    >   INIT_METHOD_CALL                                         !13, 'prepare'
        144        SEND_VAL_EX                                              'select+world.name+from+instance+inner+join+world+on+instance.world_id+%3D+world.id+where+instance.id+%3D+%3F'
        145        DO_FCALL                                      0  $125    
        146        ASSIGN                                                   !14, $125
   43   147        INIT_METHOD_CALL                                         !14, 'bind_param'
        148        SEND_VAL_EX                                              'i'
        149        SEND_VAR_EX                                              !0
        150        DO_FCALL                                      0          
   44   151        INIT_METHOD_CALL                                         !14, 'execute'
        152        DO_FCALL                                      0  $128    
        153      > JMPNZ_EX                                         ~129    $128, ->157
        154    >   FETCH_OBJ_R                                      ~130    !14, 'error'
        155      > EXIT                                                     ~130
        156*       BOOL                                             ~129    <true>
   45   157    >   INIT_METHOD_CALL                                         !14, 'bind_result'
        158        SEND_VAR_EX                                              !15
        159        DO_FCALL                                      0          
   46   160        INIT_METHOD_CALL                                         !14, 'fetch'
        161        DO_FCALL                                      0  $132    
        162      > JMPNZ_EX                                         ~133    $132, ->166
        163    >   FETCH_OBJ_R                                      ~134    !14, 'error'
        164      > EXIT                                                     ~134
        165*       BOOL                                             ~133    <true>
   47   166    >   INIT_METHOD_CALL                                         !14, 'close'
        167        DO_FCALL                                      0          
   49   168        FETCH_W                      global              $136    '_SESSION'
        169        ASSIGN_DIM                                               $136, 'serverworld'
        170        OP_DATA                                                  !15
        171      > JMP                                                      ->208
   53   172    >   FETCH_R                      global              ~138    '_SESSION'
        173        FETCH_DIM_R                                      ~139    ~138, 'serverinstance'
        174        ASSIGN                                                   !0, ~139
   54   175        FETCH_R                      global              ~141    '_SESSION'
        176        FETCH_DIM_R                                      ~142    ~141, 'patharma'
        177        ASSIGN                                                   !1, ~142
   55   178        FETCH_R                      global              ~144    '_SESSION'
        179        FETCH_DIM_R                                      ~145    ~144, 'servermodlist'
        180        ASSIGN                                                   !4, ~145
   56   181        FETCH_R                      global              ~147    '_SESSION'
        182        FETCH_DIM_R                                      ~148    ~147, 'serverip'
        183        ASSIGN                                                   !5, ~148
   57   184        FETCH_R                      global              ~150    '_SESSION'
        185        FETCH_DIM_R                                      ~151    ~150, 'serverport'
        186        ASSIGN                                                   !6, ~151
   58   187        FETCH_R                      global              ~153    '_SESSION'
        188        FETCH_DIM_R                                      ~154    ~153, 'rconpassword'
        189        ASSIGN                                                   !7, ~154
   59   190        FETCH_R                      global              ~156    '_SESSION'
        191        FETCH_DIM_R                                      ~157    ~156, 'dbhost'
        192        ASSIGN                                                   !8, ~157
   60   193        FETCH_R                      global              ~159    '_SESSION'
        194        FETCH_DIM_R                                      ~160    ~159, 'dbport'
        195        ASSIGN                                                   !9, ~160
   61   196        FETCH_R                      global              ~162    '_SESSION'
        197        FETCH_DIM_R                                      ~163    ~162, 'dbuser'
        198        ASSIGN                                                   !10, ~163
   62   199        FETCH_R                      global              ~165    '_SESSION'
        200        FETCH_DIM_R                                      ~166    ~165, 'dbpass'
        201        ASSIGN                                                   !11, ~166
   63   202        FETCH_R                      global              ~168    '_SESSION'
        203        FETCH_DIM_R                                      ~169    ~168, 'dbname'
        204        ASSIGN                                                   !12, ~169
   64   205        FETCH_R                      global              ~171    '_SESSION'
        206        FETCH_DIM_R                                      ~172    ~171, 'serverworld'
        207        ASSIGN                                                   !15, ~172
   67   208    >   CONCAT                                           ~174    'DayZ+Controlcenter+%28Instance+', !0
        209        CONCAT                                           ~175    ~174, '%29'
        210        ASSIGN                                                   !16, ~175
   68   211        CONCAT                                           ~177    'arma2oaserver_', !0
        212        CONCAT                                           ~178    ~177, '.exe'
        213        ASSIGN                                                   !17, ~178
   69   214        CONCAT                                           ~180    !1, '%5C%40dayzcc_config%5C'
        215        CONCAT                                           ~181    ~180, !0
        216        CONCAT                                           ~182    ~181, '%5C'
        217        CONCAT                                           ~183    ~182, !17
        218        ASSIGN                                                   !18, ~183
   71   219      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
295.92 ms | 1416 KiB | 22 Q