3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Database { public function query($query) { return "Database#query($query) result."; } } class SimpleKeyValCache implements Cache { private $caches = array(); public function get($key) { if (!array_key_exists($key, $this->caches)) { throw new Exception("Key Does not exist"); } return $this->caches[$key]; } public function set($key, $value) { $this->caches[$key] = $value; } } class UselessKeyValCache implements Cache { public function get($key) { throw new Exception("Key Does not exist"); } public function set($key, $value) { // NOOP; } } interface Cache { public function get($key); public function set($key, $value); } interface CacheManager { public function get($key); } class SimpleCacheManager implements CacheManager { private $cache; private $db; public function __construct(Cache $cache, Database $db) { $this->cache = $cache; $this->db = $db; } public function get($key) { try { return $this->cache->get($key); } catch (Exception $e) { $value = $this->db->query("$key"); $this->cache->set($key, $value); return $value; } } } class Api { private $manager; public function __construct(CacheManager $manager) { $this->manager = $manager; } public function getResponse() { $result["A"] = $this->manager->get("One"); $result["B"] = $this->manager->get("Two"); $result["C"] = $this->manager->get("One"); return $result; } } class DoStuff { private $api; public function __construct(Api $api, array $scalarValue) { $this->api = $api; } public function doThatStuff() { var_dump($this->api->getResponse()); } } class DoSomeOtherStuff { private $api; public function __construct(Api $api) { $this->api = $api; } public function doThatOtherStuff() { var_dump($this->api->getResponse() + $this->api->getResponse()); } } class ConstructorInjectionContainer { private $types; private $config; public function __construct($config) { $this->config = $config; } /** * Construct a type using configuration information. * * The worst case time complexity of this algorithm is O(n^n) as we are making n recursive calls in n loops. Although in practice this _should_ never be a huge issue as n will never be larger than the sum of all dependency's constructor's arguments. * */ public function resolve($type, $overrides = null) { // TODO: error handling for invalid types. // Get the concrete type name. $concreteType = $this->config[$type]["concrete"]; // Reflect the concrete type so we can dynamically create arguments and subsequently instantiate it. $reflectedType = new ReflectionClass($concreteType); $constructor = $reflectedType->getConstructor(); $paramArray = array(); // If the class has a constructor implementation then generate and instantiate the dependencies dynamically. if ($constructor !== null) { $constructorParams = $constructor->getParameters(); foreach($constructorParams as $param) { $paramArray[$param->name] = $this->getParamValue($type, $param, $overrides); } } return $reflectedType->newInstanceArgs($paramArray); } private function getParamValue($type, $param, $overrides) { // Check overrides first, then check config. if ($overrides !== null && isset($overrides[$type]) && array_key_exists($param->name, $overrides[$type])) { return $overrides[$type][$param->name]; } elseif (array_key_exists($param->name, $this->config[$type]["constructor"])) { return $this->resolve($this->config[$type]["constructor"][$param->name], $overrides); } elseif (array_key_exists($this->config[$type]["concrete"], $this->config)) { return $this->resolve($this->config[$type]["concrete"], $overrides); } else { throw new Exception("Value for $type constructor parameter {$param->name} was not defined in overrides or configuration."); } } } $config = <<<'JSON' { "Cache": { "concrete": "SimpleKeyValCache", "constructor": { } }, "CacheManager": { "concrete": "SimpleCacheManager", "constructor": { "cache": "Cache" } }, "Api": { "concrete": "Api", "constructor": { "manager": "CacheManager" } }, "DoStuff": { "concrete": "DoStuff", "constructor": { "api": "Api" } }, "DoSomeOtherStuff": { "concrete": "DoSomeOtherStuff", "constructor": { "api": "CacheManager" } } } JSON; $di = new ConstructorInjectionContainer(json_decode($config, true)); $database = new Database(); $dostuff = $di->resolve("DoStuff", array( "CacheManager" => array( "db" => $database ), "DoStuff" => array( "scalarValue" => array() ) ) )->doThatStuff(); exit;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/cWYtB
function name:  (null)
number of ops:  27
compiled vars:  !0 = $config, !1 = $di, !2 = $database, !3 = $dostuff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   DECLARE_CLASS                                            'simplekeyvalcache'
   27     1        DECLARE_CLASS                                            'uselesskeyvalcache'
   47     2        DECLARE_CLASS                                            'simplecachemanager'
  180     3        ASSIGN                                                   !0, '%7B%0A++%22Cache%22%3A+%7B%0A++++%22concrete%22%3A+%22SimpleKeyValCache%22%2C%0A++++%22constructor%22%3A+%7B%0A%0A++++%7D%0A++%7D%2C%0A%0A++%22CacheManager%22%3A+%7B%0A++++%22concrete%22%3A+%22SimpleCacheManager%22%2C%0A++++%22constructor%22%3A+%7B%0A++++++%22cache%22%3A+%22Cache%22%0A++++%7D%0A++%7D%2C%0A%0A++%22Api%22%3A+%7B%0A++++%22concrete%22%3A+%22Api%22%2C%0A++++%22constructor%22%3A+%7B%0A++++++%22manager%22%3A+%22CacheManager%22%0A++++%7D%0A++%7D%2C%0A%0A++%22DoStuff%22%3A+%7B%0A++++%22concrete%22%3A+%22DoStuff%22%2C%0A++++%22constructor%22%3A+%7B%0A++++++%22api%22%3A+%22Api%22%0A++++%7D%0A++%7D%2C%0A%0A++%22DoSomeOtherStuff%22%3A+%7B%0A++++%22concrete%22%3A+%22DoSomeOtherStuff%22%2C%0A++++%22constructor%22%3A+%7B%0A++++++%22api%22%3A+%22CacheManager%22%0A++++%7D%0A++%7D%0A%7D'
  219     4        NEW                                              $5      'ConstructorInjectionContainer'
          5        INIT_FCALL                                               'json_decode'
          6        SEND_VAR                                                 !0
          7        SEND_VAL                                                 <true>
          8        DO_ICALL                                         $6      
          9        SEND_VAR_NO_REF_EX                                       $6
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !1, $5
  221    12        NEW                                              $9      'Database'
         13        DO_FCALL                                      0          
         14        ASSIGN                                                   !2, $9
  223    15        INIT_METHOD_CALL                                         !1, 'resolve'
         16        SEND_VAL_EX                                              'DoStuff'
  225    17        INIT_ARRAY                                       ~12     !2, 'db'
         18        INIT_ARRAY                                       ~13     ~12, 'CacheManager'
         19        ADD_ARRAY_ELEMENT                                ~13     <array>, 'DoStuff'
         20        SEND_VAL_EX                                              ~13
         21        DO_FCALL                                      0  $14     
  231    22        INIT_METHOD_CALL                                         $14, 'doThatStuff'
         23        DO_FCALL                                      0  $15     
  223    24        ASSIGN                                                   !3, $15
  232    25      > EXIT                                                     
         26*     > RETURN                                                   1

Class Database:
Function query:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cWYtB
function name:  query
number of ops:  6
compiled vars:  !0 = $query
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        ROPE_INIT                                     3  ~2      'Database%23query%28'
          2        ROPE_ADD                                      1  ~2      ~2, !0
          3        ROPE_END                                      2  ~1      ~2, '%29+result.'
          4      > RETURN                                                   ~1
    8     5*     > RETURN                                                   null

End of function query

End of class Database.

Class SimpleKeyValCache:
Function get:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 9
Branch analysis from position: 5
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cWYtB
function name:  get
number of ops:  13
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   15     1        FETCH_OBJ_R                                      ~1      'caches'
          2        ARRAY_KEY_EXISTS                                 ~2      !0, ~1
          3        BOOL_NOT                                         ~3      ~2
          4      > JMPZ                                                     ~3, ->9
   16     5    >   NEW                                              $4      'Exception'
          6        SEND_VAL_EX                                              'Key+Does+not+exist'
          7        DO_FCALL                                      0          
          8      > THROW                                         0          $4
   19     9    >   FETCH_OBJ_R                                      ~6      'caches'
         10        FETCH_DIM_R                                      ~7      ~6, !0
         11      > RETURN                                                   ~7
   20    12*     > RETURN                                                   null

End of function get

Function set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cWYtB
function name:  set
number of ops:  6
compiled vars:  !0 = $key, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   23     2        FETCH_OBJ_W                                      $2      'caches'
          3        ASSIGN_DIM                                               $2, !0
          4        OP_DATA                                                  !1
   24     5      > RETURN                                                   null

End of function set

End of class SimpleKeyValCache.

Class UselessKeyValCache:
Function get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/cWYtB
function name:  get
number of ops:  6
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   RECV                                             !0      
   29     1        NEW                                              $1      'Exception'
          2        SEND_VAL_EX                                              'Key+Does+not+exist'
          3        DO_FCALL                                      0          
          4      > THROW                                         0          $1
   30     5*     > RETURN                                                   null

End of function get

Function set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cWYtB
function name:  set
number of ops:  3
compiled vars:  !0 = $key, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   34     2      > RETURN                                                   null

End of function set

End of class UselessKeyValCache.

Class Cache:
Function get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cWYtB
function name:  get
number of ops:  2
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   38     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function get

Function set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cWYtB
function name:  set
number of ops:  3
compiled vars:  !0 = $key, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   39     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2      > RETURN                                                   null

End of function set

End of class Cache.

Class CacheManager:
Function get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cWYtB
function name:  get
number of ops:  2
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   43     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function get

End of class CacheManager.

Class SimpleCacheManager:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cWYtB
function name:  __construct
number of ops:  7
compiled vars:  !0 = $cache, !1 = $db
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   51     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   52     2        ASSIGN_OBJ                                               'cache'
          3        OP_DATA                                                  !0
   53     4        ASSIGN_OBJ                                               'db'
          5        OP_DATA                                                  !1
   54     6      > RETURN                                                   null

End of function __construct

Function get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 7
Branch analysis from position: 7
2 jumps found. (Code = 107) Position 1 = 8, Position 2 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cWYtB
function name:  get
number of ops:  21
compiled vars:  !0 = $key, !1 = $e, !2 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   56     0  E >   RECV                                             !0      
   58     1        FETCH_OBJ_R                                      ~3      'cache'
          2        INIT_METHOD_CALL                                         ~3, 'get'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0  $4      
          5      > RETURN                                                   $4
          6*       JMP                                                      ->20
   59     7  E > > CATCH                                       last         'Exception'
   60     8    >   FETCH_OBJ_R                                      ~5      'db'
          9        INIT_METHOD_CALL                                         ~5, 'query'
         10        CAST                                          6  ~6      !0
         11        SEND_VAL_EX                                              ~6
         12        DO_FCALL                                      0  $7      
         13        ASSIGN                                                   !2, $7
   61    14        FETCH_OBJ_R                                      ~9      'cache'
         15        INIT_METHOD_CALL                                         ~9, 'set'
         16        SEND_VAR_EX                                              !0
         17        SEND_VAR_EX                                              !2
         18        DO_FCALL                                      0          
   62    19      > RETURN                                                   !2
   64    20*     > RETURN                                                   null

End of function get

End of class SimpleCacheManager.

Class Api:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cWYtB
function name:  __construct
number of ops:  4
compiled vars:  !0 = $manager
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   72     0  E >   RECV                                             !0      
   73     1        ASSIGN_OBJ                                               'manager'
          2        OP_DATA                                                  !0
   74     3      > RETURN                                                   null

End of function __construct

Function getresponse:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cWYtB
function name:  getResponse
number of ops:  20
compiled vars:  !0 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   78     0  E >   FETCH_OBJ_R                                      ~2      'manager'
          1        INIT_METHOD_CALL                                         ~2, 'get'
          2        SEND_VAL_EX                                              'One'
          3        DO_FCALL                                      0  $3      
          4        ASSIGN_DIM                                               !0, 'A'
          5        OP_DATA                                                  $3
   79     6        FETCH_OBJ_R                                      ~5      'manager'
          7        INIT_METHOD_CALL                                         ~5, 'get'
          8        SEND_VAL_EX                                              'Two'
          9        DO_FCALL                                      0  $6      
         10        ASSIGN_DIM                                               !0, 'B'
         11        OP_DATA                                                  $6
   80    12        FETCH_OBJ_R                                      ~8      'manager'
         13        INIT_METHOD_CALL                                         ~8, 'get'
         14        SEND_VAL_EX                                              'One'
         15        DO_FCALL                                      0  $9      
         16        ASSIGN_DIM                                               !0, 'C'
         17        OP_DATA                                                  $9
   81    18      > RETURN                                                   !0
   82    19*     > RETURN                                                   null

End of function getresponse

End of class Api.

Class DoStuff:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cWYtB
function name:  __construct
number of ops:  5
compiled vars:  !0 = $api, !1 = $scalarValue
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   91     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   92     2        ASSIGN_OBJ                                               'api'
          3        OP_DATA                                                  !0
   93     4      > RETURN                                                   null

End of function __construct

Function dothatstuff:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cWYtB
function name:  doThatStuff
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   97     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_OBJ_R                                      ~0      'api'
          2        INIT_METHOD_CALL                                         ~0, 'getResponse'
          3        DO_FCALL                                      0  $1      
          4        SEND_VAR                                                 $1
          5        DO_ICALL                                                 
   98     6      > RETURN                                                   null

End of function dothatstuff

End of class DoStuff.

Class DoSomeOtherStuff:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cWYtB
function name:  __construct
number of ops:  4
compiled vars:  !0 = $api
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  104     0  E >   RECV                                             !0      
  105     1        ASSIGN_OBJ                                               'api'
          2        OP_DATA                                                  !0
  106     3      > RETURN                                                   null

End of function __construct

Function dothatotherstuff:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cWYtB
function name:  doThatOtherStuff
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  109     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_OBJ_R                                      ~0      'api'
          2        INIT_METHOD_CALL                                         ~0, 'getResponse'
          3        DO_FCALL                                      0  $1      
          4        FETCH_OBJ_R                                      ~2      'api'
          5        INIT_METHOD_CALL                                         ~2, 'getResponse'
          6        DO_FCALL                                      0  $3      
          7        ADD                                              ~4      $1, $3
          8        SEND_VAL                                                 ~4
          9        DO_ICALL                                                 
  110    10      > RETURN                                                   null

End of function dothatotherstuff

End of class DoSomeOtherStuff.

Class ConstructorInjectionContainer:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cWYtB
function name:  __construct
number of ops:  4
compiled vars:  !0 = $config
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  125     0  E >   RECV                                             !0      
  126     1        ASSIGN_OBJ                                               'config'
          2        OP_DATA                                                  !0
  127     3      > RETURN                                                   null

End of function __construct

Function resolve:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 31
Branch analysis from position: 16
2 jumps found. (Code = 77) Position 1 = 20, Position 2 = 30
Branch analysis from position: 20
2 jumps found. (Code = 78) Position 1 = 21, Position 2 = 30
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
Branch analysis from position: 31
filename:       /in/cWYtB
function name:  resolve
number of ops:  36
compiled vars:  !0 = $type, !1 = $overrides, !2 = $concreteType, !3 = $reflectedType, !4 = $constructor, !5 = $paramArray, !6 = $constructorParams, !7 = $param
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  135     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
  140     2        FETCH_OBJ_R                                      ~8      'config'
          3        FETCH_DIM_R                                      ~9      ~8, !0
          4        FETCH_DIM_R                                      ~10     ~9, 'concrete'
          5        ASSIGN                                                   !2, ~10
  143     6        NEW                                              $12     'ReflectionClass'
          7        SEND_VAR_EX                                              !2
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !3, $12
  144    10        INIT_METHOD_CALL                                         !3, 'getConstructor'
         11        DO_FCALL                                      0  $15     
         12        ASSIGN                                                   !4, $15
  146    13        ASSIGN                                                   !5, <array>
  149    14        TYPE_CHECK                                  1020          !4
         15      > JMPZ                                                     ~18, ->31
  151    16    >   INIT_METHOD_CALL                                         !4, 'getParameters'
         17        DO_FCALL                                      0  $19     
         18        ASSIGN                                                   !6, $19
  153    19      > FE_RESET_R                                       $21     !6, ->30
         20    > > FE_FETCH_R                                               $21, !7, ->30
  154    21    >   FETCH_OBJ_R                                      ~22     !7, 'name'
         22        INIT_METHOD_CALL                                         'getParamValue'
         23        SEND_VAR_EX                                              !0
         24        SEND_VAR_EX                                              !7
         25        SEND_VAR_EX                                              !1
         26        DO_FCALL                                      0  $24     
         27        ASSIGN_DIM                                               !5, ~22
         28        OP_DATA                                                  $24
  153    29      > JMP                                                      ->20
         30    >   FE_FREE                                                  $21
  158    31    >   INIT_METHOD_CALL                                         !3, 'newInstanceArgs'
         32        SEND_VAR_EX                                              !5
         33        DO_FCALL                                      0  $25     
         34      > RETURN                                                   $25
  159    35*     > RETURN                                                   null

End of function resolve

Function getparamvalue:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
2 jumps found. (Code = 46) Position 1 = 8, Position 2 = 12
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 18
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
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
2 jumps found. (Code = 43) Position 1 = 42, Position 2 = 52
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 52
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 12
Branch analysis from position: 7
filename:       /in/cWYtB
function name:  getParamValue
number of ops:  63
compiled vars:  !0 = $type, !1 = $param, !2 = $overrides
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  161     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
  163     3        TYPE_CHECK                                  1020  ~3      !2
          4      > JMPZ_EX                                          ~3      ~3, ->7
          5    >   ISSET_ISEMPTY_DIM_OBJ                         0  ~4      !2, !0
          6        BOOL                                             ~3      ~4
          7    > > JMPZ_EX                                          ~3      ~3, ->12
          8    >   FETCH_OBJ_R                                      ~5      !1, 'name'
          9        FETCH_DIM_R                                      ~6      !2, !0
         10        ARRAY_KEY_EXISTS                                 ~7      ~5, ~6
         11        BOOL                                             ~3      ~7
         12    > > JMPZ                                                     ~3, ->18
  164    13    >   FETCH_OBJ_R                                      ~9      !1, 'name'
         14        FETCH_DIM_R                                      ~8      !2, !0
         15        FETCH_DIM_R                                      ~10     ~8, ~9
         16      > RETURN                                                   ~10
         17*       JMP                                                      ->62
  166    18    >   FETCH_OBJ_R                                      ~11     !1, 'name'
         19        FETCH_OBJ_R                                      ~12     'config'
         20        FETCH_DIM_R                                      ~13     ~12, !0
         21        FETCH_DIM_R                                      ~14     ~13, 'constructor'
         22        ARRAY_KEY_EXISTS                                         ~11, ~14
         23      > JMPZ                                                     ~15, ->36
  167    24    >   INIT_METHOD_CALL                                         'resolve'
         25        CHECK_FUNC_ARG                                           
         26        FETCH_OBJ_R                                      ~19     !1, 'name'
         27        FETCH_OBJ_FUNC_ARG                               $16     'config'
         28        FETCH_DIM_FUNC_ARG                               $17     $16, !0
         29        FETCH_DIM_FUNC_ARG                               $18     $17, 'constructor'
         30        FETCH_DIM_FUNC_ARG                               $20     $18, ~19
         31        SEND_FUNC_ARG                                            $20
         32        SEND_VAR_EX                                              !2
         33        DO_FCALL                                      0  $21     
         34      > RETURN                                                   $21
         35*       JMP                                                      ->62
  169    36    >   FETCH_OBJ_R                                      ~22     'config'
         37        FETCH_DIM_R                                      ~23     ~22, !0
         38        FETCH_DIM_R                                      ~24     ~23, 'concrete'
         39        FETCH_OBJ_R                                      ~25     'config'
         40        ARRAY_KEY_EXISTS                                         ~24, ~25
         41      > JMPZ                                                     ~26, ->52
  170    42    >   INIT_METHOD_CALL                                         'resolve'
         43        CHECK_FUNC_ARG                                           
         44        FETCH_OBJ_FUNC_ARG                               $27     'config'
         45        FETCH_DIM_FUNC_ARG                               $28     $27, !0
         46        FETCH_DIM_FUNC_ARG                               $29     $28, 'concrete'
         47        SEND_FUNC_ARG                                            $29
         48        SEND_VAR_EX                                              !2
         49        DO_FCALL                                      0  $30     
         50      > RETURN                                                   $30
         51*       JMP                                                      ->62
  173    52    >   NEW                                              $31     'Exception'
         53        ROPE_INIT                                     5  ~34     'Value+for+'
         54        ROPE_ADD                                      1  ~34     ~34, !0
         55        ROPE_ADD                                      2  ~34     ~34, '+constructor+parameter+'
         56        FETCH_OBJ_R                                      ~32     !1, 'name'
         57        ROPE_ADD                                      3  ~34     ~34, ~32
         58        ROPE_END                                      4  ~33     ~34, '+was+not+defined+in+overrides+or+configuration.'
         59        SEND_VAL_EX                                              ~33
         60        DO_FCALL                                      0          
         61      > THROW                                         0          $31
  175    62*     > RETURN                                                   null

End of function getparamvalue

End of class ConstructorInjectionContainer.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.47 ms | 1424 KiB | 17 Q