3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait X{ function tryA(A $a){ $this->test($a); } abstract function test(A $a); } trait Y{ function tryB(B $b){ $this->test($b); } abstract function test(B $b); } interface LOLI{ function test(A $b); } class LOL implements LOLI{ use X, Y; function test(A $a){} } class A{} class B{} $x = new LOL; $x->tryA(new A); $x->tryB(new B);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9hpBZ
function name:  (null)
number of ops:  15
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   DECLARE_CLASS                                            'lol'
   33     1        NEW                                              $1      'LOL'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   34     4        INIT_METHOD_CALL                                         !0, 'tryA'
          5        NEW                                              $4      'A'
          6        DO_FCALL                                      0          
          7        SEND_VAR_NO_REF_EX                                       $4
          8        DO_FCALL                                      0          
   35     9        INIT_METHOD_CALL                                         !0, 'tryB'
         10        NEW                                              $7      'B'
         11        DO_FCALL                                      0          
         12        SEND_VAR_NO_REF_EX                                       $7
         13        DO_FCALL                                      0          
         14      > RETURN                                                   1

Class X:
Function trya:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9hpBZ
function name:  tryA
number of ops:  5
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        INIT_METHOD_CALL                                         'test'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
    6     4      > RETURN                                                   null

End of function trya

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

End of function test

End of class X.

Class Y:
Function tryb:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9hpBZ
function name:  tryB
number of ops:  5
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        INIT_METHOD_CALL                                         'test'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
   14     4      > RETURN                                                   null

End of function tryb

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

End of function test

End of class Y.

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

End of function test

End of class LOLI.

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

End of function test

End of class LOL.

Class A: [no user functions]
Class B: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.37 ms | 1390 KiB | 13 Q