3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace CW\Router; use CW\Errors\NiunException; class Route { public static $request; private static $param; private static $paramArr = array(); public static function run($route_rule = array()){ self::$request = $route_rule; $routes = self::matchURI(); self::_prepareParams($routes); self::_prepareRoute($routes['controller'], $routes['action']); } private static function matchURI($uri = null) { $uri = (!$uri) ? parse_url($_SERVER['REQUEST_URI']) : $uri; $uri = ($uri['path'] == '/') ? '/' : rtrim($uri['path'],'\/'); if(!empty(self::$request)) { $count=count(self::$request); for($i=0; $i<$count; ++$i) { foreach(self::$request[$i] as $k => $v) { if (is_array($v) and $k !== 'param') { self::$param = self::$request[$i]['param']; $v['request'] = preg_replace_callback('/\<(?<key>[0-9a-z_]+)\>/', 'self::_replacer', str_replace(")",")?", $v['request']) ); $rulleTemp = array_merge((array)self::$request[$i], (array)$v); if(($t = self::_reportRulle($rulleTemp, $uri))) return $t; } } } } else return array(); } private static function _replacer($matches) { if(isset(self::$param[$matches['key']])) { return "(?<".$matches['key'].">".self::$param[$matches['key']].")"; } else return "(?<".$matches['key'].">"."([^/]+)".")"; } private static function _reportRulle($ini_array, $uri) { if(is_array($ini_array) and $uri) { if(preg_match("#^".$ini_array['request']."$#", $uri, $match)){ $r = array_merge((array)$ini_array, (array)$match); foreach($r as $k => $v) if((int)$k OR $k == 'param' OR $k == 'request') unset($r[$k]); return $r; } } } /** * Preparing controller to be included. Checking is controller exists. * Creating new specific model instance. Creating controller instance. * * @param $controller string Controller name. * @param $method string Method name. */ static function _prepareRoute($controller, $action) { $controller_path = Application . $controller . '/' . $controller . 'Controller.php'; self::_checkControllerExists($controller_path); self::_createModelInstance($controller); self::_createInstance($controller, $action); } /** * Checks requested URL on params and id and if exists sets to the private vars. * * @param $routes array Requested URL. */ static function _prepareParams($routes) { if ((!empty($routes['lang']) && !empty($routes['pagination']) && !empty($routes['page'])) || !empty($routes['lang']) || !empty($routes['pagination']) || !empty($routes['page'])) { self::$paramArr['lang'] = $routes['lang']; self::$paramArr['pagination'] = $routes['pagination']; self::$paramArr['page'] = $routes['page']; } } /** * Checks is controller exists and inlcude it. * * @param $controller_path string Controller path. Used to include and controller. * @throws Exception */ static function _checkControllerExists($controller_path) { try { if (file_exists($controller_path)) { require_once $controller_path; } else { throw new NiunException; } } catch (NiunException $e) { echo $e->getMessage(); } } /** * Creating new instance that required by URL. * * @param $controller string Controller name. * @param $method string Method name. */ static function _createInstance($controller, $action) { $instance = new $controller; if (method_exists($instance, $action)) { $reflection = new \ReflectionMethod($instance, $action); if (!$reflection->isPublic()) { @header('Location: /'); } $instance->$action(self::$paramArr); } else { @header('Location: /'); } } /** * Creates instance of model by requested controller. * * @param $controller string Controller name. */ static function _createModelInstance($controller) { $model = Application . $controller . '/' . $controller . 'Model.php'; if(file_exists($model)) { require_once ($model); } } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8hBvT
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  141     0  E > > RETURN                                                   1

Class CW\Router\Route:
Function run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8hBvT
function name:  run
number of ops:  18
compiled vars:  !0 = $route_rule, !1 = $routes
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV_INIT                                        !0      <array>
   14     1        ASSIGN_STATIC_PROP                                       'request'
          2        OP_DATA                                                  !0
   15     3        INIT_STATIC_METHOD_CALL                                  'matchURI'
          4        DO_FCALL                                      0  $3      
          5        ASSIGN                                                   !1, $3
   16     6        INIT_STATIC_METHOD_CALL                                  '_prepareParams'
          7        SEND_VAR_EX                                              !1
          8        DO_FCALL                                      0          
   17     9        INIT_STATIC_METHOD_CALL                                  '_prepareRoute'
         10        CHECK_FUNC_ARG                                           
         11        FETCH_DIM_FUNC_ARG                               $6      !1, 'controller'
         12        SEND_FUNC_ARG                                            $6
         13        CHECK_FUNC_ARG                                           
         14        FETCH_DIM_FUNC_ARG                               $7      !1, 'action'
         15        SEND_FUNC_ARG                                            $7
         16        DO_FCALL                                      0          
   18    17      > RETURN                                                   null

End of function run

Function matchuri:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 11
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 91
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 88
Branch analysis from position: 88
2 jumps found. (Code = 44) Position 1 = 90, Position 2 = 37
Branch analysis from position: 90
1 jumps found. (Code = 42) Position 1 = 92
Branch analysis from position: 92
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
2 jumps found. (Code = 77) Position 1 = 40, Position 2 = 86
Branch analysis from position: 40
2 jumps found. (Code = 78) Position 1 = 41, Position 2 = 86
Branch analysis from position: 41
2 jumps found. (Code = 46) Position 1 = 46, Position 2 = 48
Branch analysis from position: 46
2 jumps found. (Code = 43) Position 1 = 49, Position 2 = 85
Branch analysis from position: 49
2 jumps found. (Code = 43) Position 1 = 83, Position 2 = 85
Branch analysis from position: 83
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 85
1 jumps found. (Code = 42) Position 1 = 40
Branch analysis from position: 40
Branch analysis from position: 85
Branch analysis from position: 48
Branch analysis from position: 86
2 jumps found. (Code = 44) Position 1 = 90, Position 2 = 37
Branch analysis from position: 90
Branch analysis from position: 37
Branch analysis from position: 86
Branch analysis from position: 91
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 91
Branch analysis from position: 29
Branch analysis from position: 91
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
Branch analysis from position: 18
filename:       /in/8hBvT
function name:  matchURI
number of ops:  93
compiled vars:  !0 = $uri, !1 = $count, !2 = $i, !3 = $v, !4 = $k, !5 = $rulleTemp, !6 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV_INIT                                        !0      null
   21     1        BOOL_NOT                                         ~7      !0
          2      > JMPZ                                                     ~7, ->11
          3    >   INIT_NS_FCALL_BY_NAME                                    'CW%5CRouter%5Cparse_url'
          4        CHECK_FUNC_ARG                                           
          5        FETCH_FUNC_ARG               global              $8      '_SERVER'
          6        FETCH_DIM_FUNC_ARG                               $9      $8, 'REQUEST_URI'
          7        SEND_FUNC_ARG                                            $9
          8        DO_FCALL                                      0  $10     
          9        QM_ASSIGN                                        ~11     $10
         10      > JMP                                                      ->12
         11    >   QM_ASSIGN                                        ~11     !0
         12    >   ASSIGN                                                   !0, ~11
   22    13        FETCH_DIM_R                                      ~13     !0, 'path'
         14        IS_EQUAL                                                 ~13, '%2F'
         15      > JMPZ                                                     ~14, ->18
         16    >   QM_ASSIGN                                        ~15     '%2F'
         17      > JMP                                                      ->25
         18    >   INIT_NS_FCALL_BY_NAME                                    'CW%5CRouter%5Crtrim'
         19        CHECK_FUNC_ARG                                           
         20        FETCH_DIM_FUNC_ARG                               $16     !0, 'path'
         21        SEND_FUNC_ARG                                            $16
         22        SEND_VAL_EX                                              '%5C%2F'
         23        DO_FCALL                                      0  $17     
         24        QM_ASSIGN                                        ~15     $17
         25    >   ASSIGN                                                   !0, ~15
   23    26        ISSET_ISEMPTY_STATIC_PROP                        ~19     'request'
         27        BOOL_NOT                                         ~20     ~19
         28      > JMPZ                                                     ~20, ->91
   24    29    >   INIT_NS_FCALL_BY_NAME                                    'CW%5CRouter%5Ccount'
         30        CHECK_FUNC_ARG                                           
         31        FETCH_STATIC_PROP_FUNC_ARG   unknown             $21     'request'
         32        SEND_FUNC_ARG                                            $21
         33        DO_FCALL                                      0  $22     
         34        ASSIGN                                                   !1, $22
   25    35        ASSIGN                                                   !2, 0
         36      > JMP                                                      ->88
   26    37    >   FETCH_STATIC_PROP_R          unknown             ~25     'request'
         38        FETCH_DIM_R                                      ~26     ~25, !2
         39      > FE_RESET_R                                       $27     ~26, ->86
         40    > > FE_FETCH_R                                       ~28     $27, !3, ->86
         41    >   ASSIGN                                                   !4, ~28
   27    42        INIT_NS_FCALL_BY_NAME                                    'CW%5CRouter%5Cis_array'
         43        SEND_VAR_EX                                              !3
         44        DO_FCALL                                      0  $30     
         45      > JMPZ_EX                                          ~31     $30, ->48
         46    >   IS_NOT_IDENTICAL                                 ~32     !4, 'param'
         47        BOOL                                             ~31     ~32
         48    > > JMPZ                                                     ~31, ->85
   28    49    >   FETCH_STATIC_PROP_R          unknown             ~34     'request'
         50        FETCH_DIM_R                                      ~35     ~34, !2
         51        FETCH_DIM_R                                      ~36     ~35, 'param'
         52        ASSIGN_STATIC_PROP                                       'param'
         53        OP_DATA                                                  ~36
   29    54        INIT_NS_FCALL_BY_NAME                                    'CW%5CRouter%5Cpreg_replace_callback'
         55        SEND_VAL_EX                                              '%2F%5C%3C%28%3F%3Ckey%3E%5B0-9a-z_%5D%2B%29%5C%3E%2F'
   30    56        SEND_VAL_EX                                              'self%3A%3A_replacer'
   31    57        INIT_NS_FCALL_BY_NAME                                    'CW%5CRouter%5Cstr_replace'
         58        SEND_VAL_EX                                              '%29'
         59        SEND_VAL_EX                                              '%29%3F'
         60        CHECK_FUNC_ARG                                           
         61        FETCH_DIM_FUNC_ARG                               $38     !3, 'request'
         62        SEND_FUNC_ARG                                            $38
         63        DO_FCALL                                      0  $39     
         64        SEND_VAR_NO_REF_EX                                       $39
         65        DO_FCALL                                      0  $40     
   29    66        ASSIGN_DIM                                               !3, 'request'
   31    67        OP_DATA                                                  $40
   33    68        INIT_NS_FCALL_BY_NAME                                    'CW%5CRouter%5Carray_merge'
         69        FETCH_STATIC_PROP_R          unknown             ~41     'request'
         70        FETCH_DIM_R                                      ~42     ~41, !2
         71        CAST                                          7  ~43     ~42
         72        SEND_VAL_EX                                              ~43
         73        CAST                                          7  ~44     !3
         74        SEND_VAL_EX                                              ~44
         75        DO_FCALL                                      0  $45     
         76        ASSIGN                                                   !5, $45
   34    77        INIT_STATIC_METHOD_CALL                                  '_reportRulle'
         78        SEND_VAR_EX                                              !5
         79        SEND_VAR_EX                                              !0
         80        DO_FCALL                                      0  $47     
         81        ASSIGN                                           ~48     !6, $47
         82      > JMPZ                                                     ~48, ->85
   35    83    >   FE_FREE                                                  $27
         84      > RETURN                                                   !6
   26    85    > > JMP                                                      ->40
         86    >   FE_FREE                                                  $27
   25    87        PRE_INC                                                  !2
         88    >   IS_SMALLER                                               !2, !1
         89      > JMPNZ                                                    ~50, ->37
         90    > > JMP                                                      ->92
   40    91    > > RETURN                                                   <array>
   41    92    > > RETURN                                                   null

End of function matchuri

Function _replacer:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 15
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8hBvT
function name:  _replacer
number of ops:  22
compiled vars:  !0 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   43     0  E >   RECV                                             !0      
   44     1        FETCH_DIM_R                                      ~2      !0, 'key'
          2        FETCH_STATIC_PROP_IS                             ~1      'param'
          3        ISSET_ISEMPTY_DIM_OBJ                         0          ~1, ~2
          4      > JMPZ                                                     ~3, ->15
   45     5    >   FETCH_DIM_R                                      ~4      !0, 'key'
          6        CONCAT                                           ~5      '%28%3F%3C', ~4
          7        CONCAT                                           ~6      ~5, '%3E'
          8        FETCH_DIM_R                                      ~8      !0, 'key'
          9        FETCH_STATIC_PROP_R          unknown             ~7      'param'
         10        FETCH_DIM_R                                      ~9      ~7, ~8
         11        CONCAT                                           ~10     ~6, ~9
         12        CONCAT                                           ~11     ~10, '%29'
         13      > RETURN                                                   ~11
         14*       JMP                                                      ->21
   46    15    >   FETCH_DIM_R                                      ~12     !0, 'key'
         16        CONCAT                                           ~13     '%28%3F%3C', ~12
         17        CONCAT                                           ~14     ~13, '%3E'
         18        CONCAT                                           ~15     ~14, '%28%5B%5E%2F%5D%2B%29'
         19        CONCAT                                           ~16     ~15, '%29'
         20      > RETURN                                                   ~16
   47    21*     > RETURN                                                   null

End of function _replacer

Function _reportrulle:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 39
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 39
Branch analysis from position: 17
2 jumps found. (Code = 77) Position 1 = 25, Position 2 = 37
Branch analysis from position: 25
2 jumps found. (Code = 78) Position 1 = 26, Position 2 = 37
Branch analysis from position: 26
2 jumps found. (Code = 47) Position 1 = 29, Position 2 = 31
Branch analysis from position: 29
2 jumps found. (Code = 47) Position 1 = 32, Position 2 = 34
Branch analysis from position: 32
2 jumps found. (Code = 43) Position 1 = 35, Position 2 = 36
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
Branch analysis from position: 36
Branch analysis from position: 34
Branch analysis from position: 31
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
Branch analysis from position: 7
filename:       /in/8hBvT
function name:  _reportRulle
number of ops:  40
compiled vars:  !0 = $ini_array, !1 = $uri, !2 = $match, !3 = $r, !4 = $v, !5 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   49     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   50     2        INIT_NS_FCALL_BY_NAME                                    'CW%5CRouter%5Cis_array'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0  $6      
          5      > JMPZ_EX                                          ~7      $6, ->7
          6    >   BOOL                                             ~7      !1
          7    > > JMPZ                                                     ~7, ->39
   51     8    >   INIT_NS_FCALL_BY_NAME                                    'CW%5CRouter%5Cpreg_match'
          9        FETCH_DIM_R                                      ~8      !0, 'request'
         10        CONCAT                                           ~9      '%23%5E', ~8
         11        CONCAT                                           ~10     ~9, '%24%23'
         12        SEND_VAL_EX                                              ~10
         13        SEND_VAR_EX                                              !1
         14        SEND_VAR_EX                                              !2
         15        DO_FCALL                                      0  $11     
         16      > JMPZ                                                     $11, ->39
   52    17    >   INIT_NS_FCALL_BY_NAME                                    'CW%5CRouter%5Carray_merge'
         18        CAST                                          7  ~12     !0
         19        SEND_VAL_EX                                              ~12
         20        CAST                                          7  ~13     !2
         21        SEND_VAL_EX                                              ~13
         22        DO_FCALL                                      0  $14     
         23        ASSIGN                                                   !3, $14
   53    24      > FE_RESET_R                                       $16     !3, ->37
         25    > > FE_FETCH_R                                       ~17     $16, !4, ->37
         26    >   ASSIGN                                                   !5, ~17
   54    27        CAST                                          4  ~19     !5
         28      > JMPNZ_EX                                         ~19     ~19, ->31
         29    >   IS_EQUAL                                         ~20     !5, 'param'
         30        BOOL                                             ~19     ~20
         31    > > JMPNZ_EX                                         ~19     ~19, ->34
         32    >   IS_EQUAL                                         ~21     !5, 'request'
         33        BOOL                                             ~19     ~21
         34    > > JMPZ                                                     ~19, ->36
   55    35    >   UNSET_DIM                                                !3, !5
   53    36    > > JMP                                                      ->25
         37    >   FE_FREE                                                  $16
   56    38      > RETURN                                                   !3
   59    39    > > RETURN                                                   null

End of function _reportrulle

Function _prepareroute:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8hBvT
function name:  _prepareRoute
number of ops:  19
compiled vars:  !0 = $controller, !1 = $action, !2 = $controller_path
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   68     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   70     2        FETCH_CONSTANT                                   ~3      'CW%5CRouter%5CApplication'
          3        CONCAT                                           ~4      ~3, !0
          4        CONCAT                                           ~5      ~4, '%2F'
          5        CONCAT                                           ~6      ~5, !0
          6        CONCAT                                           ~7      ~6, 'Controller.php'
          7        ASSIGN                                                   !2, ~7
   72     8        INIT_STATIC_METHOD_CALL                                  '_checkControllerExists'
          9        SEND_VAR_EX                                              !2
         10        DO_FCALL                                      0          
   73    11        INIT_STATIC_METHOD_CALL                                  '_createModelInstance'
         12        SEND_VAR_EX                                              !0
         13        DO_FCALL                                      0          
   74    14        INIT_STATIC_METHOD_CALL                                  '_createInstance'
         15        SEND_VAR_EX                                              !0
         16        SEND_VAR_EX                                              !1
         17        DO_FCALL                                      0          
   75    18      > RETURN                                                   null

End of function _prepareroute

Function _prepareparams:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
2 jumps found. (Code = 46) Position 1 = 8, Position 2 = 11
Branch analysis from position: 8
2 jumps found. (Code = 47) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
2 jumps found. (Code = 47) Position 1 = 16, Position 2 = 19
Branch analysis from position: 16
2 jumps found. (Code = 47) Position 1 = 20, Position 2 = 23
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 36
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
Branch analysis from position: 23
Branch analysis from position: 19
Branch analysis from position: 15
Branch analysis from position: 11
Branch analysis from position: 7
filename:       /in/8hBvT
function name:  _prepareParams
number of ops:  37
compiled vars:  !0 = $routes
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   82     0  E >   RECV                                             !0      
   83     1        ISSET_ISEMPTY_DIM_OBJ                         1  ~1      !0, 'lang'
          2        BOOL_NOT                                         ~2      ~1
          3      > JMPZ_EX                                          ~2      ~2, ->7
          4    >   ISSET_ISEMPTY_DIM_OBJ                         1  ~3      !0, 'pagination'
          5        BOOL_NOT                                         ~4      ~3
          6        BOOL                                             ~2      ~4
          7    > > JMPZ_EX                                          ~2      ~2, ->11
          8    >   ISSET_ISEMPTY_DIM_OBJ                         1  ~5      !0, 'page'
          9        BOOL_NOT                                         ~6      ~5
         10        BOOL                                             ~2      ~6
         11    > > JMPNZ_EX                                         ~2      ~2, ->15
         12    >   ISSET_ISEMPTY_DIM_OBJ                         1  ~7      !0, 'lang'
         13        BOOL_NOT                                         ~8      ~7
         14        BOOL                                             ~2      ~8
         15    > > JMPNZ_EX                                         ~2      ~2, ->19
         16    >   ISSET_ISEMPTY_DIM_OBJ                         1  ~9      !0, 'pagination'
         17        BOOL_NOT                                         ~10     ~9
         18        BOOL                                             ~2      ~10
         19    > > JMPNZ_EX                                         ~2      ~2, ->23
         20    >   ISSET_ISEMPTY_DIM_OBJ                         1  ~11     !0, 'page'
         21        BOOL_NOT                                         ~12     ~11
         22        BOOL                                             ~2      ~12
         23    > > JMPZ                                                     ~2, ->36
   84    24    >   FETCH_DIM_R                                      ~15     !0, 'lang'
         25        FETCH_STATIC_PROP_W          global              $13     'paramArr'
         26        ASSIGN_DIM                                               $13, 'lang'
         27        OP_DATA                                                  ~15
   85    28        FETCH_DIM_R                                      ~18     !0, 'pagination'
         29        FETCH_STATIC_PROP_W          unknown             $16     'paramArr'
         30        ASSIGN_DIM                                               $16, 'pagination'
         31        OP_DATA                                                  ~18
   86    32        FETCH_DIM_R                                      ~21     !0, 'page'
         33        FETCH_STATIC_PROP_W          unknown             $19     'paramArr'
         34        ASSIGN_DIM                                               $19, 'page'
         35        OP_DATA                                                  ~21
   88    36    > > RETURN                                                   null

End of function _prepareparams

Function _checkcontrollerexists:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 108) Position 1 = -2
Found catch point at position: 11
Branch analysis from position: 11
2 jumps found. (Code = 107) Position 1 = 12, Position 2 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8hBvT
function name:  _checkControllerExists
number of ops:  16
compiled vars:  !0 = $controller_path, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   96     0  E >   RECV                                             !0      
   98     1        INIT_NS_FCALL_BY_NAME                                    'CW%5CRouter%5Cfile_exists'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $2      
          4      > JMPZ                                                     $2, ->7
   99     5    >   INCLUDE_OR_EVAL                                          !0, REQUIRE_ONCE
          6      > JMP                                                      ->10
  101     7    >   NEW                                              $4      'CW%5CErrors%5CNiunException'
          8        DO_FCALL                                      0          
          9      > THROW                                         0          $4
         10    > > JMP                                                      ->15
  103    11  E > > CATCH                                       last         'CW%5CErrors%5CNiunException'
  104    12    >   INIT_METHOD_CALL                                         !1, 'getMessage'
         13        DO_FCALL                                      0  $6      
         14        ECHO                                                     $6
  106    15    > > RETURN                                                   null

End of function _checkcontrollerexists

Function _createinstance:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 31
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 25
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8hBvT
function name:  _createInstance
number of ops:  37
compiled vars:  !0 = $controller, !1 = $action, !2 = $instance, !3 = $reflection
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  114     0  E >   RECV                                             !0      
          1        RECV                                             !1      
  116     2        FETCH_CLASS                                   0  $4      !0
          3        NEW                                              $5      $4
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !2, $5
  118     6        INIT_NS_FCALL_BY_NAME                                    'CW%5CRouter%5Cmethod_exists'
          7        SEND_VAR_EX                                              !2
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0  $8      
         10      > JMPZ                                                     $8, ->31
  119    11    >   NEW                                              $9      'ReflectionMethod'
         12        SEND_VAR_EX                                              !2
         13        SEND_VAR_EX                                              !1
         14        DO_FCALL                                      0          
         15        ASSIGN                                                   !3, $9
  120    16        INIT_METHOD_CALL                                         !3, 'isPublic'
         17        DO_FCALL                                      0  $12     
         18        BOOL_NOT                                         ~13     $12
         19      > JMPZ                                                     ~13, ->25
  121    20    >   BEGIN_SILENCE                                    ~14     
         21        INIT_NS_FCALL_BY_NAME                                    'CW%5CRouter%5Cheader'
         22        SEND_VAL_EX                                              'Location%3A+%2F'
         23        DO_FCALL                                      0          
         24        END_SILENCE                                              ~14
  123    25    >   INIT_METHOD_CALL                                         !2, !1
         26        CHECK_FUNC_ARG                                           
         27        FETCH_STATIC_PROP_FUNC_ARG   unknown             $16     'paramArr'
         28        SEND_FUNC_ARG                                            $16
         29        DO_FCALL                                      0          
         30      > JMP                                                      ->36
  125    31    >   BEGIN_SILENCE                                    ~18     
         32        INIT_NS_FCALL_BY_NAME                                    'CW%5CRouter%5Cheader'
         33        SEND_VAL_EX                                              'Location%3A+%2F'
         34        DO_FCALL                                      0          
         35        END_SILENCE                                              ~18
  127    36    > > RETURN                                                   null

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.32 ms | 1432 KiB | 35 Q