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

End of function __invoke

End of class Magnus\ObjectDispatch.

Class Magnus\Context:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Posi

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
307.74 ms | 1422 KiB | 43 Q