3v4l.org

run code in 300+ PHP versions simultaneously
<?php // The controller class Controller { public function indexAction(MyLibrary $obj) { $variable = rand(1,10); // this is the variable my library needs // But this is NOT DI'd as it's only decided here } } // A random object that is a dependency of MyLibrary class AnotherObject { } // This is what is DI'd into my controller class MyLibrary { public function __construct(AnotherObject $obj2, $variable) { } } // Auryn won't know about the $variable until my controller gets it
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t9RLm
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E > > RETURN                                                   1

Class Controller:
Function indexaction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t9RLm
function name:  indexAction
number of ops:  7
compiled vars:  !0 = $obj, !1 = $variable
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    8     1        INIT_FCALL                                               'rand'
          2        SEND_VAL                                                 1
          3        SEND_VAL                                                 10
          4        DO_ICALL                                         $2      
          5        ASSIGN                                                   !1, $2
   10     6      > RETURN                                                   null

End of function indexaction

End of class Controller.

Class AnotherObject: [no user functions]
Class MyLibrary:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t9RLm
function name:  __construct
number of ops:  3
compiled vars:  !0 = $obj2, !1 = $variable
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2      > RETURN                                                   null

End of function __construct

End of class MyLibrary.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.52 ms | 1399 KiB | 15 Q