3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* Hurricane Control Panel © 2014, a web control panel by Hurricane Development of http://www.HurricaneDevelopment.com is licenced under a Creative Commons Attribution-NoDerivatives 4.0 International License Permissions beyond the scope of this licence may be available at http://creativecommons.org/licenses/by-nd/4.0/ */ Defined("_HEXEC") or die ("This file may not be accessed directly"); class VARS { public static $errors = false; public static $extraJS = false; public static $scriptJS = false; public static $extraCSS = false; } abstract class GeneralUTIL { /** * Error functions **/ public static function addErr($err) { VARS::$errors[] = $err; } public static function logger($content,$level = LOGGER_INFO) { if (!file_exists("logs")) { mkdir("logs"); } $scanned_directory = array_diff(scandir("logs",SCANDIR_SORT_DESCENDING), array('..', '.')); $logs = false; if (sizeof($scanned_directory) == 0) { file_put_contents("logs/log.1", "", LOCK_EX); chmod("logs/log.1",0600); $logid = 1; } else { foreach ($scanned_directory as $key => $value) { if (strpos($value,"log.") !== false) { $logs[] = $value; } } $logid = explode(".", $logs[0]); $logid = $logid[1]; if (filesize("logs/log." . $logid) >= 200000) { $logid = ((int) $logid) + 1; file_put_contents("logs/log." . $logid, "", LOCK_EX); chmod("logs/log." . $logid,0600); } } date_default_timezone_set("America/New_York"); $d = getdate(); file_put_contents("logs/log." . $logid, "{$d['mon']}/{$d['mday']}/{$d['year']} {$d['hours']}:{$d['minutes']}:{$d['seconds']} $level $content \n", FILE_APPEND | LOCK_EX); } public static function sha512($password,$salt = null) { if ($salt == null) { $cost = 50000; $salt = strtr(base64_encode(mcrypt_create_iv(16, MCRYPT_DEV_URANDOM)), '+', '.'); $salt = sprintf('$6$rounds=%d$', $cost) . $salt; } return crypt($password, $salt); } public static function matchSha512($password,$hash) { if (crypt($password, $hash) === $hash) { return true; } return false; } } class PluginUTIL extends GeneralUTIL { public static function addJS($jsPath) { $debugArray = debug_backtrace(); $pluginAlias = UTIL::getBetween($debugArray[0]['file'],"/plugins/plugin_","/"); if ($pluginAlias == false) { UTIL::addErr("The addJS Method was not called from a registered plugin"); return false; } $pluginLoader = new Plugins(); $pluginLoader->loadPlugins(); $plugins = $pluginLoader->getPluginsArray(); foreach ($plugins as $id => $pluginArray) { if ($pluginArray['alias'] == $pluginAlias) { VARS::$extraJS[] = PATH . "plugins/plugin_" . $pluginAlias . "/" . $jsPath; return true; } } } public static function addScriptJS($script) { VARS::$scriptJS = $script; } public static function addCSS($cssPath) { $debugArray = debug_backtrace(); $pluginAlias = UTIL::getBetween($debugArray[0]['file'],"/plugins/plugin_","/"); if ($pluginAlias == false) { UTIL::addErr("The addCSS Method was not called from a registered plugin"); return false; } $pluginLoader = new Plugins(); $pluginLoader->loadPlugins(); $plugins = $pluginLoader->getPluginsArray(); foreach ($plugins as $id => $pluginArray) { if ($pluginArray['alias'] == $pluginAlias) { VARS::$extraCSS[] = PATH . "plugins/plugin_" . $pluginAlias . "/" . $cssPath; return true; } } } } class UTIL extends GeneralUTIL { public static function displayErrors($output) { if (VARS::$errors != false && is_array(VARS::$errors)) { $output = str_replace("<div id='errors' class='alert alert-danger'></div>","<div id='errors' class='alert alert-danger'><h1>Uh Oh. Some errors occured!</h1>" . implode("<br>",VARS::$errors) . "</div>",$output); } else { $output = str_replace("<div id='errors' class='alert alert-danger'></div>","",$output); } return $output; } /** * Custom JS /CSS functions **/ public static function addCustomJSFromPath($path) { VARS::$extraJS[] = PATH . $path; } public static function includeCustomJS() { if (VARS::$extraJS != false && is_array(VARS::$extraJS)) { foreach (VARS::$extraJS as $key => $path): ?> <script src="<?php echo $path; ?>"></script> <?php endforeach; } if (VARS::$scriptJS != false): ?> <script type="text/javascript"> <?php echo VARS::$scriptJS; ?> </script> <? endif; } public static function includeCustomCSS($output) { if (VARS::$extraCSS != false && is_array(VARS::$extraCSS)) { $css = ""; foreach (VARS::$extraCSS as $key => $path): $css .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"$path\">\n"; endforeach; $output = str_replace("CUSTOMCSSAREAHERE",$css,$output); } else { $output = str_replace("CUSTOMCSSAREAHERE","",$output); } return $output; } /** * Get Between two strings function **/ public static function getBetween($content,$start,$end) { if (preg_match('/' . str_replace("/","\\/", $start) . '(.*?)' . str_replace("/","\\/", $end) . '/',$content, $res) === false) { return false; } return $res[1]; } /** * Redirect page function **/ public static function redirect($location, $code = '302') { switch($code) { case '301'; header("HTTP/1.1 301 Moved Permanently"); break; case '303'; header("HTTP/1.1 303 See Other"); break; case '404'; header('HTTP/1.1 404 Not Found'); break; } //remove any &amp; in the url to prevent any problems $location = str_replace('&amp;', '&', $location); header("Location: $location"); //kill the script from running and output a link for browsers which enable turning off header redirects *cough Opera cough* :P exit('<a href="'.$location.'">If you were not redirected automatically please click here</a>'); } } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 2, Position 2 = 4
Branch analysis from position: 2
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NOH5S
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   DEFINED                                          ~0      '_HEXEC'
          1      > JMPNZ_EX                                         ~0      ~0, ->4
          2    > > EXIT                                                     'This+file+may+not+be+accessed+directly'
          3*       BOOL                                             ~0      <true>
  219     4    > > RETURN                                                   1

Class VARS: [no user functions]
Class GeneralUTIL:
Function adderr:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NOH5S
function name:  addErr
number of ops:  5
compiled vars:  !0 = $err
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   RECV                                             !0      
   25     1        FETCH_STATIC_PROP_W          global              $1      'errors'
          2        ASSIGN_DIM                                               $1
          3        OP_DATA                                                  !0
   26     4      > RETURN                                                   null

End of function adderr

Function logger:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 34
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 75
Branch analysis from position: 75
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
2 jumps found. (Code = 77) Position 1 = 35, Position 2 = 46
Branch analysis from position: 35
2 jumps found. (Code = 78) Position 1 = 36, Position 2 = 46
Branch analysis from position: 36
2 jumps found. (Code = 43) Position 1 = 43, Position 2 = 45
Branch analysis from position: 43
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
Branch analysis from position: 45
Branch analysis from position: 46
2 jumps found. (Code = 43) Position 1 = 61, Position 2 = 75
Branch analysis from position: 61
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 75
Branch analysis from position: 46
Branch analysis from position: 10
filename:       /in/NOH5S
function name:  logger
number of ops:  110
compiled vars:  !0 = $content, !1 = $level, !2 = $scanned_directory, !3 = $logs, !4 = $logid, !5 = $value, !6 = $key, !7 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <const ast>
   29     2        INIT_FCALL                                               'file_exists'
          3        SEND_VAL                                                 'logs'
          4        DO_ICALL                                         $8      
          5        BOOL_NOT                                         ~9      $8
          6      > JMPZ                                                     ~9, ->10
   30     7    >   INIT_FCALL                                               'mkdir'
          8        SEND_VAL                                                 'logs'
          9        DO_ICALL                                                 
   33    10    >   INIT_FCALL                                               'array_diff'
         11        INIT_FCALL                                               'scandir'
         12        SEND_VAL                                                 'logs'
         13        SEND_VAL                                                 1
         14        DO_ICALL                                         $11     
         15        SEND_VAR                                                 $11
         16        SEND_VAL                                                 <array>
         17        DO_ICALL                                         $12     
         18        ASSIGN                                                   !2, $12
   34    19        ASSIGN                                                   !3, <false>
   36    20        COUNT                                            ~15     !2
         21        IS_EQUAL                                                 ~15, 0
         22      > JMPZ                                                     ~16, ->34
   37    23    >   INIT_FCALL                                               'file_put_contents'
         24        SEND_VAL                                                 'logs%2Flog.1'
         25        SEND_VAL                                                 ''
         26        SEND_VAL                                                 2
         27        DO_ICALL                                                 
   38    28        INIT_FCALL                                               'chmod'
         29        SEND_VAL                                                 'logs%2Flog.1'
         30        SEND_VAL                                                 384
         31        DO_ICALL                                                 
   39    32        ASSIGN                                                   !4, 1
         33      > JMP                                                      ->75
   41    34    > > FE_RESET_R                                       $20     !2, ->46
         35    > > FE_FETCH_R                                       ~21     $20, !5, ->46
         36    >   ASSIGN                                                   !6, ~21
   42    37        INIT_FCALL                                               'strpos'
         38        SEND_VAR                                                 !5
         39        SEND_VAL                                                 'log.'
         40        DO_ICALL                                         $23     
         41        TYPE_CHECK                                  1018          $23
         42      > JMPZ                                                     ~24, ->45
   43    43    >   ASSIGN_DIM                                               !3
         44        OP_DATA                                                  !5
   41    45    > > JMP                                                      ->35
         46    >   FE_FREE                                                  $20
   47    47        INIT_FCALL                                               'explode'
         48        SEND_VAL                                                 '.'
         49        FETCH_DIM_R                                      ~26     !3, 0
         50        SEND_VAL                                                 ~26
         51        DO_ICALL                                         $27     
         52        ASSIGN                                                   !4, $27
   48    53        FETCH_DIM_R                                      ~29     !4, 1
         54        ASSIGN                                                   !4, ~29
   50    55        INIT_FCALL                                               'filesize'
         56        CONCAT                                           ~31     'logs%2Flog.', !4
         57        SEND_VAL                                                 ~31
         58        DO_ICALL                                         $32     
         59        IS_SMALLER_OR_EQUAL                                      200000, $32
         60      > JMPZ                                                     ~33, ->75
   51    61    >   CAST                                          4  ~34     !4
         62        ADD                                              ~35     ~34, 1
         63        ASSIGN                                                   !4, ~35
   52    64        INIT_FCALL                                               'file_put_contents'
         65        CONCAT                                           ~37     'logs%2Flog.', !4
         66        SEND_VAL                                                 ~37
         67        SEND_VAL                                                 ''
         68        SEND_VAL                                                 2
         69        DO_ICALL                                                 
   53    70        INIT_FCALL                                               'chmod'
         71        CONCAT                                           ~39     'logs%2Flog.', !4
         72        SEND_VAL                                                 ~39
         73        SEND_VAL                                                 384
         74        DO_ICALL                                                 
   58    75    >   INIT_FCALL                                               'date_default_timezone_set'
         76        SEND_VAL                                                 'America%2FNew_York'
         77        DO_ICALL                                                 
   59    78        INIT_FCALL                                               'getdate'
         79        DO_ICALL                                         $42     
         80        ASSIGN                                                   !7, $42
   61    81        INIT_FCALL                                               'file_put_contents'
         82        CONCAT                                           ~44     'logs%2Flog.', !4
         83        SEND_VAL                                                 ~44
         84        FETCH_DIM_R                                      ~45     !7, 'mon'
         85        ROPE_INIT                                    16  ~52     ~45
         86        ROPE_ADD                                      1  ~52     ~52, '%2F'
         87        FETCH_DIM_R                                      ~46     !7, 'mday'
         88        ROPE_ADD                                      2  ~52     ~52, ~46
         89        ROPE_ADD                                      3  ~52     ~52, '%2F'
         90        FETCH_DIM_R                                      ~47     !7, 'year'
         91        ROPE_ADD                                      4  ~52     ~52, ~47
         92        ROPE_ADD                                      5  ~52     ~52, '+'
         93        FETCH_DIM_R                                      ~48     !7, 'hours'
         94        ROPE_ADD                                      6  ~52     ~52, ~48
         95        ROPE_ADD                                      7  ~52     ~52, '%3A'
         96        FETCH_DIM_R                                      ~49     !7, 'minutes'
         97        ROPE_ADD                                      8  ~52     ~52, ~49
         98        ROPE_ADD                                      9  ~52     ~52, '%3A'
         99        FETCH_DIM_R                                      ~50     !7, 'seconds'
        100        ROPE_ADD                                     10  ~52     ~52, ~50
        101        ROPE_ADD                                     11  ~52     ~52, '+'
        102        ROPE_ADD                                     12  ~52     ~52, !1
        103        ROPE_ADD                                     13  ~52     ~52, '+'
        104        ROPE_ADD                                     14  ~52     ~52, !0
        105        ROPE_END                                     15  ~51     ~52, '+%0A'
        106        SEND_VAL                                                 ~51
        107        SEND_VAL                                                 10
        108        DO_ICALL                                                 
   62   109      > RETURN                                                   null

End of function logger

Function sha512:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 25
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/NOH5S
function name:  sha512
number of ops:  31
compiled vars:  !0 = $password, !1 = $salt, !2 = $cost
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   64     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
   65     2        IS_EQUAL                                                 !1, null
          3      > JMPZ                                                     ~3, ->25
   66     4    >   ASSIGN                                                   !2, 50000
   68     5        INIT_FCALL                                               'strtr'
          6        INIT_FCALL                                               'base64_encode'
          7        INIT_FCALL_BY_NAME                                       'mcrypt_create_iv'
          8        SEND_VAL_EX                                              16
          9        FETCH_CONSTANT                                   ~5      'MCRYPT_DEV_URANDOM'
         10        SEND_VAL_EX                                              ~5
         11        DO_FCALL                                      0  $6      
         12        SEND_VAR                                                 $6
         13        DO_ICALL                                         $7      
         14        SEND_VAR                                                 $7
         15        SEND_VAL                                                 '%2B'
         16        SEND_VAL                                                 '.'
         17        DO_ICALL                                         $8      
         18        ASSIGN                                                   !1, $8
   70    19        INIT_FCALL                                               'sprintf'
         20        SEND_VAL                                                 '%246%24rounds%3D%25d%24'
         21        SEND_VAR                                                 !2
         22        DO_ICALL                                         $10     
         23        CONCAT                                           ~11     $10, !1
         24        ASSIGN                                                   !1, ~11
   73    25    >   INIT_FCALL                                               'crypt'
         26        SEND_VAR                                                 !0
         27        SEND_VAR                                                 !1
         28        DO_ICALL                                         $13     
         29      > RETURN                                                   $13
   74    30*     > RETURN                                                   null

End of function sha512

Function matchsha512:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NOH5S
function name:  matchSha512
number of ops:  11
compiled vars:  !0 = $password, !1 = $hash
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   76     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   77     2        INIT_FCALL                                               'crypt'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $2      
          6        IS_IDENTICAL                                             !1, $2
          7      > JMPZ                                                     ~3, ->9
   78     8    > > RETURN                                                   <true>
   80     9    > > RETURN                                                   <false>
   81    10*     > RETURN                                                   null

End of function matchsha512

End of class GeneralUTIL.

Class PluginUTIL:
Function addjs:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 19
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
2 jumps found. (Code = 77) Position 1 = 28, Position 2 = 44
Branch analysis from position: 28
2 jumps found. (Code = 78) Position 1 = 29, Position 2 = 44
Branch analysis from position: 29
2 jumps found. (Code = 43) Position 1 = 33, Position 2 = 43
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 43
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
Branch analysis from position: 44
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 44
filename:       /in/NOH5S
function name:  addJS
number of ops:  46
compiled vars:  !0 = $jsPath, !1 = $debugArray, !2 = $pluginAlias, !3 = $pluginLoader, !4 = $plugins, !5 = $pluginArray, !6 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   86     0  E >   RECV                                             !0      
   87     1        INIT_FCALL                                               'debug_backtrace'
          2        DO_ICALL                                         $7      
          3        ASSIGN                                                   !1, $7
   88     4        INIT_STATIC_METHOD_CALL                                  'UTIL', 'getBetween'
          5        CHECK_FUNC_ARG                                           
          6        FETCH_DIM_FUNC_ARG                               $9      !1, 0
          7        FETCH_DIM_FUNC_ARG                               $10     $9, 'file'
          8        SEND_FUNC_ARG                                            $10
          9        SEND_VAL_EX                                              '%2Fplugins%2Fplugin_'
         10        SEND_VAL_EX                                              '%2F'
         11        DO_FCALL                                      0  $11     
         12        ASSIGN                                                   !2, $11
   90    13        BOOL_NOT                                         ~13     !2
         14      > JMPZ                                                     ~13, ->19
   91    15    >   INIT_STATIC_METHOD_CALL                                  'UTIL', 'addErr'
         16        SEND_VAL_EX                                              'The+addJS+Method+was+not+called+from+a+registered+plugin'
         17        DO_FCALL                                      0          
   92    18      > RETURN                                                   <false>
   95    19    >   NEW                                              $15     'Plugins'
         20        DO_FCALL                                      0          
         21        ASSIGN                                                   !3, $15
   97    22        INIT_METHOD_CALL                                         !3, 'loadPlugins'
         23        DO_FCALL                                      0          
   98    24        INIT_METHOD_CALL                                         !3, 'getPluginsArray'
         25        DO_FCALL                                      0  $19     
         26        ASSIGN                                                   !4, $19
  100    27      > FE_RESET_R                                       $21     !4, ->44
         28    > > FE_FETCH_R                                       ~22     $21, !5, ->44
         29    >   ASSIGN                                                   !6, ~22
  101    30        FETCH_DIM_R                                      ~24     !5, 'alias'
         31        IS_EQUAL                                                 !2, ~24
         32      > JMPZ                                                     ~25, ->43
  102    33    >   FETCH_CONSTANT                                   ~28     'PATH'
         34        CONCAT                                           ~29     ~28, 'plugins%2Fplugin_'
         35        CONCAT                                           ~30     ~29, !2
         36        CONCAT                                           ~31     ~30, '%2F'
         37        CONCAT                                           ~32     ~31, !0
         38        FETCH_STATIC_PROP_W          unknown             $26     'extraJS'
         39        ASSIGN_DIM                                               $26
         40        OP_DATA                                                  ~32
  104    41        FE_FREE                                                  $21
         42      > RETURN                                                   <true>
  100    43    > > JMP                                                      ->28
         44    >   FE_FREE                                                  $21
  107    45      > RETURN                                                   null

End of function addjs

Function addscriptjs:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NOH5S
function name:  addScriptJS
number of ops:  4
compiled vars:  !0 = $script
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  109     0  E >   RECV                                             !0      
  110     1        ASSIGN_STATIC_PROP                                       'scriptJS', 'VARS'
          2        OP_DATA                                                  !0
  111     3      > RETURN                                                   null

End of function addscriptjs

Function addcss:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 19
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
2 jumps found. (Code = 77) Position 1 = 28, Position 2 = 44
Branch analysis from position: 28
2 jumps found. (Code = 78) Position 1 = 29, Position 2 = 44
Branch analysis from position: 29
2 jumps found. (Code = 43) Position 1 = 33, Position 2 = 43
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 43
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
Branch analysis from position: 44
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 44
filename:       /in/NOH5S
function name:  addCSS
number of ops:  46
compiled vars:  !0 = $cssPath, !1 = $debugArray, !2 = $pluginAlias, !3 = $pluginLoader, !4 = $plugins, !5 = $pluginArray, !6 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  113     0  E >   RECV                                             !0      
  114     1        INIT_FCALL                                               'debug_backtrace'
          2        DO_ICALL                                         $7      
          3        ASSIGN                                                   !1, $7
  115     4        INIT_STATIC_METHOD_CALL                                  'UTIL', 'getBetween'
          5        CHECK_FUNC_ARG                                           
          6        FETCH_DIM_FUNC_ARG                               $9      !1, 0
          7        FETCH_DIM_FUNC_ARG                               $10     $9, 'file'
          8        SEND_FUNC_ARG                                            $10
          9        SEND_VAL_EX                                              '%2Fplugins%2Fplugin_'
         10        SEND_VAL_EX                                              '%2F'
         11        DO_FCALL                                      0  $11     
         12        ASSIGN                                                   !2, $11
  117    13        BOOL_NOT                                         ~13     !2
         14      > JMPZ                                                     ~13, ->19
  118    15    >   INIT_STATIC_METHOD_CALL                                  'UTIL', 'addErr'
         16        SEND_VAL_EX                                              'The+addCSS+Method+was+not+called+from+a+registered+plugin'
         17        DO_FCALL                                      0          
  119    18      > RETURN                                                   <false>
  122    19    >   NEW                                              $15     'Plugins'
         20        DO_FCALL                                      0          
         21        ASSIGN                                                   !3, $15
  124    22        INIT_METHOD_CALL                                         !3, 'loadPlugins'
         23        DO_FCALL                                      0          
  125    24        INIT_METHOD_CALL                                         !3, 'getPluginsArray'
         25        DO_FCALL                                      0  $19     
         26        ASSIGN                                                   !4, $19
  127    27      > FE_RESET_R                                       $21     !4, ->44
         28    > > FE_FETCH_R                                       ~22     $21, !5, ->44
         29    >   ASSIGN                                                   !6, ~22
  128    30        FETCH_DIM_R                                      ~24     !5, 'alias'
         31        IS_EQUAL                                                 !2, ~24
         32      > JMPZ                                                     ~25, ->43
  129    33    >   FETCH_CONSTANT                                   ~28     'PATH'
         34        CONCAT                                           ~29     ~28, 'plugins%2Fplugin_'
         35        CONCAT                                           ~30     ~29, !2
         36        CONCAT                                           ~31     ~30, '%2F'
         37        CONCAT                                           ~32     ~31, !0
         38        FETCH_STATIC_PROP_W          unknown             $26     'extraCSS'
         39        ASSIGN_DIM                                               $26
         40        OP_DATA                                                  ~32
  131    41        FE_FREE                                                  $21
         42      > RETURN                                                   <true>
  127    43    > > JMP                                                      ->28
         44    >   FE_FREE                                                  $21
  134    45      > RETURN                                                   null

End of function addcss

Function adderr:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NOH5S
function name:  addErr
number of ops:  5
compiled vars:  !0 = $err
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   RECV                                             !0      
   25     1        FETCH_STATIC_PROP_W          global              $1      'errors'
          2        ASSIGN_DIM                                               $1
          3        OP_DATA                                                  !0
   26     4      > RETURN                                                   null

End of function adderr

Function logger:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 34
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 75
Branch analysis from position: 75
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
2 jumps found. (Code = 77) Position 1 = 35, Position 2 = 46
Branch analysis from position: 35
2 jumps found. (Code = 78) Position 1 = 36, Position 2 = 46
Branch analysis from position: 36
2 jumps found. (Code = 43) Position 1 = 43, Position 2 = 45
Branch analysis from position: 43
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
Branch analysis from position: 45
Branch analysis from position: 46
2 jumps found. (Code = 43) Position 1 = 61, Position 2 = 75
Branch analysis from position: 61
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 75
Branch analysis from position: 46
Branch analysis from position: 10
filename:       /in/NOH5S
function name:  logger
number of ops:  110
compiled vars:  !0 = $content, !1 = $level, !2 = $scanned_directory, !3 = $logs, !4 = $logid, !5 = $value, !6 = $key, !7 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <const ast>
   29     2        INIT_FCALL                                               'file_exists'
          3        SEND_VAL                                                 'logs'
          4        DO_ICALL                                         $8      
          5        BOOL_NOT                                         ~9      $8
          6      > JMPZ                                                     ~9, ->10
   30     7    >   INIT_FCALL                                               'mkdir'
          8        SEND_VAL                                                 'logs'
          9        DO_ICALL                                                 
   33    10    >   INIT_FCALL                                               'array_diff'
         11        INIT_FCALL                                               'scandir'
         12        SEND_VAL                                                 'logs'
         13        SEND_VAL                                                 1
         14        DO_ICALL                                         $11     
         15        SEND_VAR                                                 $11
         16        SEND_VAL                                                 <array>
         17        DO_ICALL                                         $12     
         18        ASSIGN                                                   !2, $12
   34    19        ASSIGN                                                   !3, <false>
   36    20        COUNT                                            ~15     !2
         21        IS_EQUAL                                                 ~15, 0
         22      > JMPZ                                                     ~16, ->34
   37    23    >   INIT_FCALL                                               'file_put_contents'
         24        SEND_VAL                                                 'logs%2Flog.1'
         25        SEND_VAL                                                 ''
         26        SEND_VAL                                                 2
         27        DO_ICALL                                                 
   38    28        INIT_FCALL                                               'chmod'

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.11 ms | 1428 KiB | 45 Q