3v4l.org

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

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

End of function compare

End of class I.

Class A:
Function compare:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IKjAJ
function name:  compare
number of ops:  3
compiled vars:  !0 = $aObject
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1      > RETURN                                                   <true>
   10     2*     > RETURN                                                   null

End of function compare

End of class A.

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

End of function compare

End of class B.

Class C:
Function compare:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IKjAJ
function name:  compare
number of ops:  3
compiled vars:  !0 = $bObject
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   RECV                                             !0      
   25     1      > RETURN                                                   <true>
   26     2*     > RETURN                                                   null

End of function compare

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.01 ms | 1399 KiB | 13 Q