3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface IA { public function compare(self $x); } interface IAChild extends IA {} class A implements IA { public function compare(IA $x) {} } class AA implements IAChild { public function compare(IAChild $x){} } $a = new A; $aa = new AA; $a->compare($a); $a->compare($aa);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ODkTf
function name:  (null)
number of ops:  16
compiled vars:  !0 = $a, !1 = $aa
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_CLASS                                            'iachild'
   10     1        DECLARE_CLASS                                            'a'
   14     2        DECLARE_CLASS                                            'aa'
   18     3        NEW                                              $2      'A'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
   19     6        NEW                                              $5      'AA'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !1, $5
   21     9        INIT_METHOD_CALL                                         !0, 'compare'
         10        SEND_VAR_EX                                              !0
         11        DO_FCALL                                      0          
   22    12        INIT_METHOD_CALL                                         !0, 'compare'
         13        SEND_VAR_EX                                              !1
         14        DO_FCALL                                      0          
         15      > RETURN                                                   1

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

End of function compare

End of class IA.

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

End of function compare

End of class A.

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

End of function compare

End of class AA.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.38 ms | 1399 KiB | 13 Q