3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Type {} class SomeType implements Type {} abstract class TypeUser { public function __construct(Type $type) {} public function test(Type $type) {} } class SomeTypeUser extends TypeUser { public function __construct(SomeType $type) {} public function test(SomeType $type) {} } $type = new SomeType(); $obj = (new SomeTypeUser($type))->test($type);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hCQTe
function name:  (null)
number of ops:  13
compiled vars:  !0 = $type, !1 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   DECLARE_CLASS                                            'sometype'
   13     1        DECLARE_CLASS                                            'sometypeuser', 'typeuser'
   19     2        NEW                                              $2      'SomeType'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $2
   20     5        NEW                                              $5      'SomeTypeUser'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0          
          8        INIT_METHOD_CALL                                         $5, 'test'
          9        SEND_VAR_EX                                              !0
         10        DO_FCALL                                      0  $7      
         11        ASSIGN                                                   !1, $7
         12      > RETURN                                                   1

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

End of function __construct

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

End of function test

End of class TypeUser.

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

End of function __construct

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

End of function test

End of class SomeTypeUser.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.89 ms | 1399 KiB | 13 Q