3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface I { public function qwer(); } abstract class A { public function asdf(C $a) { $a->qwer(); } } class C implements I { public function qwer() { echo "yep"; } } class B extends A { public function asdf(C $asdf) { parent::asdf($asdf); } } $par = new C(); (new B())->asdf($par);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kg5NP
function name:  (null)
number of ops:  10
compiled vars:  !0 = $par
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   DECLARE_CLASS                                            'c'
   26     1        NEW                                              $1      'C'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   27     4        NEW                                              $4      'B'
          5        DO_FCALL                                      0          
          6        INIT_METHOD_CALL                                         $4, 'asdf'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

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

End of function qwer

End of class I.

Class A:
Function asdf:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kg5NP
function name:  asdf
number of ops:  4
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        INIT_METHOD_CALL                                         !0, 'qwer'
          2        DO_FCALL                                      0          
   11     3      > RETURN                                                   null

End of function asdf

End of class A.

Class C:
Function qwer:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kg5NP
function name:  qwer
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   ECHO                                                     'yep'
   17     1      > RETURN                                                   null

End of function qwer

End of class C.

Class B:
Function asdf:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kg5NP
function name:  asdf
number of ops:  5
compiled vars:  !0 = $asdf
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   RECV                                             !0      
   22     1        INIT_STATIC_METHOD_CALL                                  'asdf'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
   23     4      > RETURN                                                   null

End of function asdf

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.36 ms | 1395 KiB | 13 Q