3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Magnus; class ObjectDispatch { public function routeIterator(&$path) { while (!empty($path)) { yield end($path); array_pop($path); /* This prevents having to put back a value in the event of a * readjustment in the dispatch path. * Testing indicates that it's better to do array maninpulation than it is * to implement SplDoublyLinkedList for deque behavior. Likewise, * simply tracking the index is a bit slower and can add complexity * when dealing with reorients/redispatches. */ } } public function __invoke($context, $root) { $log = $context->getLogger(); $path = $context->getRequestPath(); $last = ''; $parent = null; $current = $root; if ($context->getAppMode() === 'DEBUG' && $log !== null) { $log->addDebug('Starting Object Dispatch', [ 'request' => $context->getRequestURI(), 'path' => var_export($path, true), 'root' => var_export($root, true) ]); } foreach (routeIterator($path) as $chunk) { if ($context->getAppMode() === 'DEBUG' && $log !== null) { $log->addDebug('Beginning dispatch step.', [ 'chunk' => $chunk, 'path' => var_export($path, true), 'current' => var_export($current, true) ]); } if (!is_object($current) || class_exists($context->getControllerPrefix() . $current)) { if ($context->getAppMode() === 'DEBUG' && $log !== null) { $log->addDebug('Instantiating current class', [ 'request' => $context->getRequestURI(), 'current' => $current ]); } $current = $context->getControllerPrefix() . $current($context); } if (is_object($current)) { $parent = $current; } if (in_array($chunk, get_class_methods($parent))) { if ($context->getAppMode() === 'DEBUG' && $log !== null) { $log->addDebug('Found an endpoint', [ 'request' => $context->getRequestURI(), 'isEndpoint' => true, 'parent' => var_export($parent, true), 'handler' => $chunk, 'arguments' => var_export($path, true) ]); } yield array($parent, $chunk, $path, true); } elseif (in_array($chunk, get_object_vars($parent))) { if ($context->getAppMode() === 'DEBUG' && $log !== null) { $log->addDebug('Found a property', [ 'request' => $context->getRequestURI(), 'property' => $chunk, 'parent' => var_export($parent, true) ]); } $current = $parent->chunk; } elseif (method_exists($parent, 'lookup')) { try { list($current, $consumed) = $parent->lookup($path); $chunk = implode('/', $consumed); $path = array_slice($path, 0, count($path) - count($consumed)); } catch (Exception $e) { throw new HTTPNotFound(); } } else { throw new HTTPNotFound(); } yield array(explode('/', $last), $parent, false); $last = $chunk; } if ($context->getAppMode() === 'DEBUG' && $log !== null) { $log->addDebug('No endpoint found', [ 'request' => $context->getRequestURI(), 'current' => var_export($current), 'parent' => var_export($parent) ]); } if (!is_object($current) && class_exists($context->getControllerPrefix() . $current)) { $current = new $context->getControllerPrefix() . $current($context); } if (is_callable($current)) { yield array($current, $chunk, $path, true); } elseif (is_callable($parent)) { yield array($parent, $chunk, $path, true); } } } class Context { protected $requestURI; protected $requestPath; protected $appMode; protected $logger; protected $controllerPrefix; public function __construct(Array $config) { $this->requestURI = isset($config['requestURI']) ? $config['requestURI'] : '/'; $this->requestPath = isset($config['requestPath']) ? $config['requestPath'] : array(); $this->appMode = isset($config['appMode']) ? $config['appMode'] : 'DEVELOPMENT'; $this->logger = isset($config['logger']) ? $config['logger'] : null; $this->controllerPrefix = isset($config['controllerPrefix']) ? $config['controllerPrefix'] : null; } public function getRequestURI() { return $this->requestURI; } public function getRequestPath() { if (!is_array($this->requestPath)) { $this->requestPath = explode('/', str_replace('\\', '/', $this->requestURI)); } return $this->requestPath; } public function getAppMode() { return $this->appMode; } public function getLogger() { return $this->logger; } public function getControllerPrefix() { return $this->controllerPrefix; } } class RootController { public $home = 'homeController'; public function __invoke($args = array()) { return "Root controller index"; } } $context = new Context([ 'requestURI' => '/' ]); $dispatch = new ObjectDispatch(); foreach ($dispatch($context, 'rootController') as $signal) { echo var_export($signal, true) . "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 20
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 20
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/p1G5C
function name:  (null)
number of ops:  22
compiled vars:  !0 = $context, !1 = $dispatch, !2 = $signal
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  178     0  E >   NEW                                              $3      'Magnus%5CContext'
  179     1        SEND_VAL_EX                                              <array>
          2        DO_FCALL                                      0          
  178     3        ASSIGN                                                   !0, $3
  182     4        NEW                                              $6      'Magnus%5CObjectDispatch'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $6
  184     7        INIT_DYNAMIC_CALL                                        !1
          8        SEND_VAR_EX                                              !0
          9        SEND_VAL_EX                                              'rootController'
         10        DO_FCALL                                      0  $9      
         11      > FE_RESET_R                                       $10     $9, ->20
         12    > > FE_FETCH_R                                               $10, !2, ->20
  185    13    >   INIT_NS_FCALL_BY_NAME                                    'Magnus%5Cvar_export'
         14        SEND_VAR_EX                                              !2
         15        SEND_VAL_EX                                              <true>
         16        DO_FCALL                                      0  $11     
         17        CONCAT                                           ~12     $11, '%0A'
         18        ECHO                                                     ~12
  184    19      > JMP                                                      ->12
         20    >   FE_FREE                                                  $10
  186    21      > RETURN                                                   1

Class Magnus\ObjectDispatch:
Function routeiterator:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 3
Branch analysis from position: 13
1 jumps found. (Code = 161) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 3
Branch analysis from position: 13
Branch analysis from position: 3
filename:       /in/p1G5C
function name:  routeIterator
number of ops:  14
compiled vars:  !0 = $path
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        GENERATOR_CREATE                                         
    7     2      > JMP                                                      ->10
    8     3    >   INIT_NS_FCALL_BY_NAME                                    'Magnus%5Cend'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0  $1      
          6        YIELD                                                    $1
    9     7        INIT_NS_FCALL_BY_NAME                                    'Magnus%5Carray_pop'
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0          
    7    10    >   ISSET_ISEMPTY_CV                                 ~4      !0
         11        BOOL_NOT                                         ~5      ~4
         12      > JMPNZ                                                    ~5, ->3
   18    13    > > GENERATOR_RETURN                                         

End of function routeiterator

Function __invoke:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 36
Branch analysis from position: 19
2 jumps found. (Code = 77) Position 1 = 40, Position 2 = 224
Branch analysis from position: 40
2 jumps found. (Code = 78) Position 1 = 41, Position 2 = 224
Branch analysis from position: 41
2 jumps found. (Code = 46) Position 1 = 45, Position 2 = 47
Branch analysis from position: 45
2 jumps found. (Code = 43) Position 1 = 48, Position 2 = 63
Branch analysis from position: 48
2 jumps found. (Code = 47) Position 1 = 68, Position 2 = 75
Branch analysis from position: 68
2 jumps found. (Code = 43) Position 1 = 76, Position 2 = 98
Branch analysis from position: 76
2 jumps found. (Code = 46) Position 1 = 80, Position 2 = 82
Branch analysis from position: 80
2 jumps found. (Code = 43) Position 1 = 83, Position 2 = 91
Branch analysis from position: 83
2 jumps found. (Code = 43) Position 1 = 102, Position 2 = 103
Branch analysis from position: 102
2 jumps found. (Code = 43) Position 1 = 111, Position 2 = 143
Branch analysis from position: 111
2 jumps found. (Code = 46) Position 1 = 115, Position 2 = 117
Branch analysis from position: 115
2 jumps found. (Code = 43) Position 1 = 118, Position 2 = 137
Branch analysis from position: 118
1 jumps found. (Code = 42) Position 1 = 214
Branch analysis from position: 214
1 jumps found. (Code = 42) Position 1 = 40
Branch analysis from position: 40
Branch analysis from position: 137
Branch analysis from position: 117
Branch analysis from position: 143
2 jumps found. (Code = 43) Position 1 = 151, Position 2 = 174
Branch analysis from position: 151
2 jumps found. (Code = 46) Position 1 = 155, Position 2 = 157
Branch analysis from position: 155
2 jumps found. (Code = 43) Position 1 = 158, Position 2 = 171
Branch analysis from position: 158
1 jumps found. (Code = 42) Position 1 = 214
Branch analysis from position: 214
Branch analysis from position: 171
Branch analysis from position: 157
Branch analysis from position: 174
2 jumps found. (Code = 43) Position 1 = 179, Position 2 = 211
Branch analysis from position: 179
1 jumps found. (Code = 42) Position 1 = 210
Branch analysis from position: 210
1 jumps found. (Code = 42) Position 1 = 214
Branch analysis from position: 214
Branch analysis from position: 211
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 103
Branch analysis from position: 91
Branch analysis from position: 82
Branch analysis from position: 98
Branch analysis from position: 75
Branch analysis from position: 63
Branch analysis from position: 47
Branch analysis from position: 224
2 jumps found. (Code = 46) Position 1 = 229, Position 2 = 231
Branch analysis from position: 229
2 jumps found. (Code = 43) Position 1 = 232, Position 2 = 247
Branch analysis from position: 232
2 jumps found. (Code = 46) Position 1 = 252, Position 2 = 259
Branch analysis from position: 252
2 jumps found. (Code = 43) Position 1 = 260, Position 2 = 269
Branch analysis from position: 260
2 jumps found. (Code = 43) Position 1 = 273, Position 2 = 279
Branch analysis from position: 273
1 jumps found. (Code = 42) Position 1 = 288
Branch analysis from position: 288
1 jumps found. (Code = 161) Position 1 = -2
Branch analysis from position: 279
2 jumps found. (Code = 43) Position 1 = 283, Position 2 = 288
Branch analysis from position: 283
1 jumps found. (Code = 161) Position 1 = -2
Branch analysis from position: 288
Branch analysis from position: 269
Branch analysis from position: 259
Branch analysis from position: 247
Branch analysis from position: 231
Branch analysis from position: 224
Branch analysis from position: 36
Branch analysis from position: 18
Found catch point at position: 206
Branch analysis from position: 206
2 jumps found. (Code = 107) Position 1 = 207, Position 2 = -2
Branch analysis from position: 207
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/p1G5C
function name:  __invoke
number of ops:  289
compiled vars:  !0 = $context, !1 = $root, !2 = $log, !3 = $path, !4 = $last, !5 = $parent, !6 = $current, !7 = $chunk, !8 = $consumed, !9 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        GENERATOR_CREATE                                         
   21     3        INIT_METHOD_CALL                                         !0, 'getLogger'
          4        DO_FCALL                                      0  $10     
          5        ASSIGN                                                   !2, $10
   22     6        INIT_METHOD_CALL                                         !0, 'getRequestPath'
          7        DO_FCALL                                      0  $12     
          8        ASSIGN                                                   !3, $12
   23     9        ASSIGN                                                   !4, ''
   24    10        ASSIGN                                                   !5, null
   25    11        ASSIGN                                                   !6, !1
   27    12        INIT_METHOD_CALL                                         !0, 'getAppMode'
         13        DO_FCALL                                      0  $17     
         14        IS_IDENTICAL                                     ~18     $17, 'DEBUG'
         15      > JMPZ_EX                                          ~18     ~18, ->18
         16    >   TYPE_CHECK                                  1020  ~19     !2
         17        BOOL                                             ~18     ~19
         18    > > JMPZ                                                     ~18, ->36
   28    19    >   INIT_METHOD_CALL                                         !2, 'addDebug'
         20        SEND_VAL_EX                                              'Starting+Object+Dispatch'
   29    21        INIT_METHOD_CALL                                         !0, 'getRequestURI'
         22        DO_FCALL                                      0  $20     
         23        INIT_ARRAY                                       ~21     $20, 'request'
   30    24        INIT_NS_FCALL_BY_NAME                                    'Magnus%5Cvar_export'
         25        SEND_VAR_EX                                              !3
         26        SEND_VAL_EX                                              <true>
         27        DO_FCALL                                      0  $22     
         28        ADD_ARRAY_ELEMENT                                ~21     $22, 'path'
   31    29        INIT_NS_FCALL_BY_NAME                                    'Magnus%5Cvar_export'
         30        SEND_VAR_EX                                              !1
         31        SEND_VAL_EX                                              <true>
         32        DO_FCALL                                      0  $23     
         33        ADD_ARRAY_ELEMENT                                ~21     $23, 'root'
         34        SEND_VAL_EX                                              ~21
         35        DO_FCALL                                      0          
   35    36    >   INIT_NS_FCALL_BY_NAME                                    'Magnus%5CrouteIterator'
         37        SEND_VAR_EX                                              !3
         38        DO_FCALL                                      0  $25     
         39      > FE_RESET_R                                       $26     $25, ->224
         40    > > FE_FETCH_R                                               $26, !7, ->224
   36    41    >   INIT_METHOD_CALL                                         !0, 'getAppMode'
         42        DO_FCALL                                      0  $27     
         43        IS_IDENTICAL                                     ~28     $27, 'DEBUG'
         44      > JMPZ_EX                                          ~28     ~28, ->47
         45    >   TYPE_CHECK                                  1020  ~29     !2
         46        BOOL                                             ~28     ~29
         47    > > JMPZ                                                     ~28, ->63
   37    48    >   INIT_METHOD_CALL                                         !2, 'addDebug'
         49        SEND_VAL_EX                                              'Beginning+dispatch+step.'
   38    50        INIT_ARRAY                                       ~30     !7, 'chunk'
   39    51        INIT_NS_FCALL_BY_NAME                                    'Magnus%5Cvar_export'
         52        SEND_VAR_EX                                              !3
         53        SEND_VAL_EX                                              <true>
         54        DO_FCALL                                      0  $31     
         55        ADD_ARRAY_ELEMENT                                ~30     $31, 'path'
   40    56        INIT_NS_FCALL_BY_NAME                                    'Magnus%5Cvar_export'
         57        SEND_VAR_EX                                              !6
         58        SEND_VAL_EX                                              <true>
         59        DO_FCALL                                      0  $32     
         60        ADD_ARRAY_ELEMENT                                ~30     $32, 'current'
         61        SEND_VAL_EX                                              ~30
         62        DO_FCALL                                      0          
   44    63    >   INIT_NS_FCALL_BY_NAME                                    'Magnus%5Cis_object'
         64        SEND_VAR_EX                                              !6
         65        DO_FCALL                                      0  $34     
         66        BOOL_NOT                                         ~35     $34
         67      > JMPNZ_EX                                         ~35     ~35, ->75
         68    >   INIT_NS_FCALL_BY_NAME                                    'Magnus%5Cclass_exists'
         69        INIT_METHOD_CALL                                         !0, 'getControllerPrefix'
         70        DO_FCALL                                      0  $36     
         71        CONCAT                                           ~37     $36, !6
         72        SEND_VAL_EX                                              ~37
         73        DO_FCALL                                      0  $38     
         74        BOOL                                             ~35     $38
         75    > > JMPZ                                                     ~35, ->98
   45    76    >   INIT_METHOD_CALL                                         !0, 'getAppMode'
         77        DO_FCALL                                      0  $39     
         78        IS_IDENTICAL                                     ~40     $39, 'DEBUG'
         79      > JMPZ_EX                                          ~40     ~40, ->82
         80    >   TYPE_CHECK                                  1020  ~41     !2
         81        BOOL                                             ~40     ~41
         82    > > JMPZ                                                     ~40, ->91
   46    83    >   INIT_METHOD_CALL                                         !2, 'addDebug'
         84        SEND_VAL_EX                                              'Instantiating+current+class'
   47    85        INIT_METHOD_CALL                                         !0, 'getRequestURI'
         86        DO_FCALL                                      0  $42     
         87        INIT_ARRAY                                       ~43     $42, 'request'
   48    88        ADD_ARRAY_ELEMENT                                ~43     !6, 'current'
         89        SEND_VAL_EX                                              ~43
         90        DO_FCALL                                      0          
   52    91    >   INIT_METHOD_CALL                                         !0, 'getControllerPrefix'
         92        DO_FCALL                                      0  $45     
         93        INIT_DYNAMIC_CALL                                        !6
         94        SEND_VAR_EX                                              !0
         95        DO_FCALL                                      0  $46     
         96        CONCAT                                           ~47     $45, $46
         97        ASSIGN                                                   !6, ~47
   55    98    >   INIT_NS_FCALL_BY_NAME                                    'Magnus%5Cis_object'
         99        SEND_VAR_EX                                              !6
        100        DO_FCALL                                      0  $49     
        101      > JMPZ                                                     $49, ->103
   56   102    >   ASSIGN                                                   !5, !6
   59   103    >   INIT_NS_FCALL_BY_NAME                                    'Magnus%5Cin_array'
        104        SEND_VAR_EX                                              !7
        105        INIT_NS_FCALL_BY_NAME                                    'Magnus%5Cget_class_methods'
        106        SEND_VAR_EX                                              !5
        107        DO_FCALL                                      0  $51     
        108        SEND_VAR_NO_REF_EX                                       $51
        109        DO_FCALL                                      0  $52     
        110      > JMPZ                                                     $52, ->143
   60   111    >   INIT_METHOD_CALL                                         !0, 'getAppMode'
        112        DO_FCALL                                      0  $53     
        113        IS_IDENTICAL                                     ~54     $53, 'DEBUG'
        114      > JMPZ_EX                                          ~54     ~54, ->117
        115    >   TYPE_CHECK                                  1020  ~55     !2
        116        BOOL                                             ~54     ~55
        117    > > JMPZ                                                     ~54, ->137
   61   118    >   INIT_METHOD_CALL                                         !2, 'addDebug'
        119        SEND_VAL_EX                                              'Found+an+endpoint'
   62   120        INIT_METHOD_CALL                                         !0, 'getRequestURI'
        121        DO_FCALL                                      0  $56     
        122        INIT_ARRAY                                       ~57     $56, 'request'
        123        ADD_ARRAY_ELEMENT                                ~57     <true>, 'isEndpoint'
   64   124        INIT_NS_FCALL_BY_NAME                                    'Magnus%5Cvar_export'
        125        SEND_VAR_EX                                              !5
        126        SEND_VAL_EX                                              <true>
        127        DO_FCALL                                      0  $58     
        128        ADD_ARRAY_ELEMENT                                ~57     $58, 'parent'
   65   129        ADD_ARRAY_ELEMENT                                ~57     !7, 'handler'
   66   130        INIT_NS_FCALL_BY_NAME                                    'Magnus%5Cvar_export'
        131        SEND_VAR_EX                                              !3
        132        SEND_VAL_EX                                              <true>
        133        DO_FCALL                                      0  $59     
        134        ADD_ARRAY_ELEMENT                                ~57     $59, 'arguments'
        135        SEND_VAL_EX                                              ~57
        136        DO_FCALL                                      0          
   70   137    >   INIT_ARRAY                                       ~61     !5
        138        ADD_ARRAY_ELEMENT                                ~61     !7
        139        ADD_ARRAY_ELEMENT                                ~61     !3
        140        ADD_ARRAY_ELEMENT                                ~61     <true>
        141        YIELD                                                    ~61
        142      > JMP                                                      ->214
   72   143    >   INIT_NS_FCALL_BY_NAME                                    'Magnus%5Cin_array'
        144        SEND_VAR_EX                                              !7
        145        INIT_NS_FCALL_BY_NAME                                    'Magnus%5Cget_object_vars'
        146        SEND_VAR_EX                                              !5
        147        DO_FCALL                                      0  $63     
        148        SEND_VAR_NO_REF_EX                                       $63
        149        DO_FCALL                                      0  $64     
        150      > JMPZ                                                     $64, ->174
   73   151    >   INIT_METHOD_CALL                                         !0, 'getAppMode'
        152        DO_FCALL                                      0  $65     
        153        IS_IDENTICAL                                     ~66     $65, 'DEBUG'
        154      > JMPZ_EX                                          ~66     ~66, ->157
        155    >   TYPE_CHECK                                  1020  ~67     !2
        156        BOOL                                             ~66     ~67
        157    > > JMPZ                                                     ~66, ->171
   74   158    >   INIT_METHOD_CALL                                         !2, 'addDebug'
        159        SEND_VAL_EX                                              'Found+a+property'
   75   160        INIT_METHOD_CALL                                         !0, 'getRequestURI'
        161        DO_FCALL                                      0  $68     
        162        INIT_ARRAY                                       ~69     $68, 'request'
   76   163        ADD_ARRAY_ELEMENT                                ~69     !7, 'property'
   77   164        INIT_NS_FCALL_BY_NAME                                    'Magnus%5Cvar_export'
        165        SEND_VAR_EX                                              !5
        166        SEND_VAL_EX                                              <true>
        167        DO_FCALL                                      0  $70     
        168        ADD_ARRAY_ELEMENT                                ~69     $70, 'parent'
        169        SEND_VAL_EX                                              ~69
        170        DO_FCALL                                      0          
   81   171    >   FETCH_OBJ_R                                      ~72     !5, 'chunk'
        172        ASSIGN                                                   !6, ~72
        173      > JMP                                                      ->214
   83   174    >   INIT_NS_FCALL_BY_NAME                                    'Magnus%5Cmethod_exists'
        175        SEND_VAR_EX                                              !5
        176        SEND_VAL_EX                                              'lookup'
        177        DO_FCALL                                      0  $74     
        178      > JMPZ                                                     $74, ->211
   85   179    >   INIT_METHOD_CALL                                         !5, 'lookup'
        180        SEND_VAR_EX                                              !3
        181        DO_FCALL                                      0  $75     
        182        FETCH_LIST_R                                     $76     $75, 0
        183        ASSIGN                                                   !6, $76
        184        FETCH_LIST_R                                     $78     $75, 1
        185        ASSIGN                                                   !8, $78
        186        FREE                                                     $75
   86   187        INIT_NS_FCALL_BY_NAME                                    'Magnus%5Cimplode'
        188        SEND_VAL_EX                                              '%2F'
        189        SEND_VAR_EX                                              !8
        190        DO_FCALL                                      0  $80     
        191        ASSIGN                                                   !7, $80
   87   192        INIT_NS_FCALL_BY_NAME                                    'Magnus%5Carray_slice'
        193        SEND_VAR_EX                                              !3
        194        SEND_VAL_EX                                              0
        195        INIT_NS_FCALL_BY_NAME                                    'Magnus%5Ccount'
        196        SEND_VAR_EX                                              !3
        197        DO_FCALL                                      0  $82     
        198        INIT_NS_FCALL_BY_NAME                                    'Magnus%5Ccount'
        199        SEND_VAR_EX                                              !8
        200        DO_FCALL                                      0  $83     
        201        SUB                                              ~84     $82, $83
        202        SEND_VAL_EX                                              ~84
        203        DO_FCALL                                      0  $85     
        204        ASSIGN                                                   !3, $85
        205      > JMP                                                      ->210
   88   206  E > > CATCH                                       last         'Magnus%5CException'
   89   207    >   NEW                                              $87     'Magnus%5CHTTPNotFound'
        208        DO_FCALL                                      0          
        209      > THROW                                         0          $87
        210    > > JMP                                                      ->214
   93   211    >   NEW                                              $89     'Magnus%5CHTTPNotFound'
        212        DO_FCALL                                      0          
        213      > THROW                                         0          $89
   97   214    >   INIT_NS_FCALL_BY_NAME                                    'Magnus%5Cexplode'
        215        SEND_VAL_EX                                              '%2F'
        216        SEND_VAR_EX                                              !4
        217        DO_FCALL                                      0  $91     
        218        INIT_ARRAY                                       ~92     $91
        219        ADD_ARRAY_ELEMENT                                ~92     !5
        220        ADD_ARRAY_ELEMENT                                ~92     <false>
        221        YIELD                                                    ~92
   98   222        ASSIGN                                                   !4, !7
   35   223      > JMP                                                      ->40
        224    >   FE_FREE                                                  $26
  102   225        INIT_METHOD_CALL                                         !0, 'getAppMode'
        226        DO_FCALL                                      0  $95     
        227        IS_IDENTICAL                                     ~96     $95, 'DEBUG'
        228      > JMPZ_EX                                          ~96     ~96, ->231
        229    >   TYPE_CHECK                                  1020  ~97     !2
        230        BOOL                                             ~96     ~97
        231    > > JMPZ                                                     ~96, ->247
  103   232    >   INIT_METHOD_CALL                                         !2, 'addDebug'
        233        SEND_VAL_EX                                              'No+endpoint+found'
  104   234        INIT_METHOD_CALL                                         !0, 'getRequestURI'
        235        DO_FCALL                                      0  $98     
        236        INIT_ARRAY                                       ~99     $98, 'request'
  105   237        INIT_NS_FCALL_BY_NAME                                    'Magnus%5Cvar_export'
        238        SEND_VAR_EX                                              !6
        239        DO_FCALL                                      0  $100    
        240        ADD_ARRAY_ELEMENT                                ~99     $100, 'current'
  106   241        INIT_NS_FCALL_BY_NAME                                    'Magnus%5Cvar_export'
        242        SEND_VAR_EX                                              !5
        243        DO_FCALL                                      0  $101    
        244        ADD_ARRAY_ELEMENT                                ~99     $101, 'parent'
        245        SEND_VAL_EX                                              ~99
        246        DO_FCALL                                      0          
  110   247    >   INIT_NS_FCALL_BY_NAME                                    'Magnus%5Cis_object'
        248        SEND_VAR_EX                                              !6
        249        DO_FCALL                                      0  $103    
        250        BOOL_NOT                                         ~104    $103
        251      > JMPZ_EX                                          ~104    ~104, ->259
        252    >   INIT_NS_FCALL_BY_NAME                                    'Magnus%5Cclass_exists'
        253        INIT_METHOD_CALL                                         !0, 'getControllerPrefix'
        254        DO_FCALL                                      0  $105    
        255        CONCAT                                           ~106    $105, !6
        256        SEND_VAL_EX                                              ~106
        257        DO_FCALL                                      0  $107    
        258        BOOL                                             ~104    $107
        259    > > JMPZ                                                     ~104, ->269
  111   260    >   FETCH_OBJ_R                                      ~108    !0, 'getControllerPrefix'
        261        FETCH_CLASS                                   0  $109    ~108
        262        NEW                                              $110    $109
        263        DO_FCALL                                      0          
        264        INIT_DYNAMIC_CALL                                        !6
        265        SEND_VAR_EX                                              !0
        266        DO_FCALL                                      0  $112    
        267        CONCAT                                           ~113    $110, $112
        268        ASSIGN                                                   !6, ~113
  114   269    >   INIT_NS_FCALL_BY_NAME                                    'Magnus%5Cis_callable'
        270        SEND_VAR_EX                                              !6
        271        DO_FCALL                                      0  $115    
        272      > JMPZ                                                     $115, ->279
  115   273    >   INIT_ARRAY                                       ~116    !6
        274        ADD_ARRAY_ELEMENT                                ~116    !7
        275        ADD_ARRAY_ELEMENT                                ~116    !3
        276        ADD_ARRAY_ELEMENT                                ~116    <true>
        277        YIELD                                                    ~116
        278      > JMP                                                      ->288
  116   279    >   INIT_NS_FCALL_BY_NAME                                    'Magnus%5Cis_callable'
        280        SEND_VAR_EX                                              !5
        281        DO_FCALL 

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.02 ms | 1431 KiB | 42 Q