3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Type {} class SomeType implements Type {} class SomeOtherType 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) {} } class SomeOtherTypeUser extends TypeUser { public function __construct(SomeOtherType $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/8Q61G
function name:  (null)
number of ops:  14
compiled vars:  !0 = $type, !1 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   DECLARE_CLASS                                            'sometype'
    8     1        DECLARE_CLASS                                            'someothertype'
   17     2        DECLARE_CLASS                                            'sometypeuser', 'typeuser'
   28     3        NEW                                              $2      'SomeType'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
   29     6        NEW                                              $5      'SomeTypeUser'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0          
          9        INIT_METHOD_CALL                                         $5, 'test'
         10        SEND_VAR_EX                                              !0
         11        DO_FCALL                                      0  $7      
         12        ASSIGN                                                   !1, $7
         13      > RETURN                                                   1

Class Type: [no user functions]
Class SomeType: [no user functions]
Class SomeOtherType: [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/8Q61G
function name:  __construct
number of ops:  2
compiled vars:  !0 = $type
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     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/8Q61G
function name:  test
number of ops:  2
compiled vars:  !0 = $type
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     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/8Q61G
function name:  __construct
number of ops:  2
compiled vars:  !0 = $type
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     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/8Q61G
function name:  test
number of ops:  2
compiled vars:  !0 = $type
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function test

End of class SomeTypeUser.

Class SomeOtherTypeUser:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8Q61G
function name:  __construct
number of ops:  2
compiled vars:  !0 = $type
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     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/8Q61G
function name:  test
number of ops:  2
compiled vars:  !0 = $type
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function test

End of class SomeOtherTypeUser.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.17 ms | 1403 KiB | 13 Q