3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Base{ public function t1(){ echo "t1 in Base\n"; } public function t2(){ echo "t2 in Base\n"; } } class Child extends Base{ //lets override t1 and leave t2 intact public function t1(){ echo "t1 in Child\n"; } } function test(Base $b){ $b->t1(); $b->t2(); } $child = new Child(); test ($child);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mImQv
function name:  (null)
number of ops:  7
compiled vars:  !0 = $child
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   NEW                                              $1      'Child'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   26     3        INIT_FCALL                                               'test'
          4        SEND_VAR                                                 !0
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mImQv
function name:  test
number of ops:  6
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
   21     1        INIT_METHOD_CALL                                         !0, 't1'
          2        DO_FCALL                                      0          
   22     3        INIT_METHOD_CALL                                         !0, 't2'
          4        DO_FCALL                                      0          
   23     5      > RETURN                                                   null

End of function test

Class Base:
Function t1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mImQv
function name:  t1
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                     't1+in++Base%0A'
    6     1      > RETURN                                                   null

End of function t1

Function t2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mImQv
function name:  t2
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ECHO                                                     't2+in++Base%0A'
   10     1      > RETURN                                                   null

End of function t2

End of class Base.

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

End of function t1

Function t2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mImQv
function name:  t2
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ECHO                                                     't2+in++Base%0A'
   10     1      > RETURN                                                   null

End of function t2

End of class Child.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.34 ms | 950 KiB | 15 Q