3v4l.org

run code in 300+ PHP versions simultaneously
<?php class DEP1{} class DEP2{} class DEP3{} interface A{ function get1(): DEP1; function get2(): DEP2; function get3(): DEP3; } class AImpl implements A{ function __construct(A $DEP){ $this->x = $DEP->get1(); $this->y = $DEP->get2(); $this->z = $DEP->get3(); } function get1(): DEP1{ return $this->x; } function get2(): DEP2{ return $this->y; } function get3(): DEP3{ return $this->z; } } new AImpl(new class() implements A{ function get1(): DEP1{ return new DEP1; } function get2(): DEP2{ return new DEP2; } function get3(): DEP3{ return new DEP3; } });
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XdBiJ
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   DECLARE_CLASS                                            'aimpl'
   30     1        NEW                                              $0      'AImpl'
          2        DECLARE_ANON_CLASS                               <unknown> 
          3        NEW                                              $2      $1
          4        DO_FCALL                                      0          
          5        SEND_VAR_NO_REF_EX                                       $2
          6        DO_FCALL                                      0          
          7        FREE                                                     $0
   34     8      > RETURN                                                   1

Class DEP1: [no user functions]
Class DEP2: [no user functions]
Class DEP3: [no user functions]
Class A:
Function get1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XdBiJ
function name:  get1
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   VERIFY_RETURN_TYPE                                       
          1      > RETURN                                                   null

End of function get1

Function get2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XdBiJ
function name:  get2
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   VERIFY_RETURN_TYPE                                       
          1      > RETURN                                                   null

End of function get2

Function get3:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XdBiJ
function name:  get3
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   VERIFY_RETURN_TYPE                                       
          1      > RETURN                                                   null

End of function get3

End of class A.

Class AImpl:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XdBiJ
function name:  __construct
number of ops:  14
compiled vars:  !0 = $DEP
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   15     1        INIT_METHOD_CALL                                         !0, 'get1'
          2        DO_FCALL                                      0  $2      
          3        ASSIGN_OBJ                                               'x'
          4        OP_DATA                                                  $2
   16     5        INIT_METHOD_CALL                                         !0, 'get2'
          6        DO_FCALL                                      0  $4      
          7        ASSIGN_OBJ                                               'y'
          8        OP_DATA                                                  $4
   17     9        INIT_METHOD_CALL                                         !0, 'get3'
         10        DO_FCALL                                      0  $6      
         11        ASSIGN_OBJ                                               'z'
         12        OP_DATA                                                  $6
   18    13      > RETURN                                                   null

End of function __construct

Function get1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XdBiJ
function name:  get1
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   FETCH_OBJ_R                                      ~0      'x'
          1        VERIFY_RETURN_TYPE                                       ~0
          2      > RETURN                                                   ~0
   21     3*       VERIFY_RETURN_TYPE                                       
          4*     > RETURN                                                   null

End of function get1

Function get2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XdBiJ
function name:  get2
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   FETCH_OBJ_R                                      ~0      'y'
          1        VERIFY_RETURN_TYPE                                       ~0
          2      > RETURN                                                   ~0
   24     3*       VERIFY_RETURN_TYPE                                       
          4*     > RETURN                                                   null

End of function get2

Function get3:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XdBiJ
function name:  get3
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   FETCH_OBJ_R                                      ~0      'z'
          1        VERIFY_RETURN_TYPE                                       ~0
          2      > RETURN                                                   ~0
   27     3*       VERIFY_RETURN_TYPE                                       
          4*     > RETURN                                                   null

End of function get3

End of class AImpl.

Class A@anonymous:
Function get1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XdBiJ
function name:  get1
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   31     0  E >   NEW                                              $0      'DEP1'
          1        DO_FCALL                                      0          
          2        VERIFY_RETURN_TYPE                                       $0
          3      > RETURN                                                   $0
          4*       VERIFY_RETURN_TYPE                                       
          5*     > RETURN                                                   null

End of function get1

Function get2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XdBiJ
function name:  get2
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   NEW                                              $0      'DEP2'
          1        DO_FCALL                                      0          
          2        VERIFY_RETURN_TYPE                                       $0
          3      > RETURN                                                   $0
          4*       VERIFY_RETURN_TYPE                                       
          5*     > RETURN                                                   null

End of function get2

Function get3:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XdBiJ
function name:  get3
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   33     0  E >   NEW                                              $0      'DEP3'
          1        DO_FCALL                                      0          
          2        VERIFY_RETURN_TYPE                                       $0
          3      > RETURN                                                   $0
          4*       VERIFY_RETURN_TYPE                                       
          5*     > RETURN                                                   null

End of function get3

End of class A@anonymous.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.18 ms | 1407 KiB | 13 Q