3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface AInterface { public function getA(); } interface BInterface extends AInterface { public function getA($foo = FALSE); } class A implements AInterface { public function getA() { return 'meh'; } } class B implements BInterface { public function getA($foo = FALSE) { return $foo; } } $b = new B(); $a = new A(); print $a->getA(); print $b->getA();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DJVbd
function name:  (null)
number of ops:  16
compiled vars:  !0 = $b, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                            'binterface'
   12     1        DECLARE_CLASS                                            'a'
   19     2        DECLARE_CLASS                                            'b'
   25     3        NEW                                              $2      'B'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
   26     6        NEW                                              $5      'A'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !1, $5
   28     9        INIT_METHOD_CALL                                         !1, 'getA'
         10        DO_FCALL                                      0  $8      
         11        ECHO                                                     $8
   29    12        INIT_METHOD_CALL                                         !0, 'getA'
         13        DO_FCALL                                      0  $9      
         14        ECHO                                                     $9
         15      > RETURN                                                   1

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

End of function geta

End of class AInterface.

Class BInterface:
Function geta:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DJVbd
function name:  getA
number of ops:  2
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV_INIT                                        !0      <false>
          1      > RETURN                                                   null

End of function geta

End of class BInterface.

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

End of function geta

End of class A.

Class B:
Function geta:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DJVbd
function name:  getA
number of ops:  3
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV_INIT                                        !0      <false>
   21     1      > RETURN                                                   !0
   22     2*     > RETURN                                                   null

End of function geta

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.76 ms | 1399 KiB | 13 Q