3v4l.org

run code in 500+ PHP versions simultaneously
<?php class a { protected function c() { echo 'Parent'; } public function test() { $this->c(); } } class b extends a { protected function c() { echo 'Child'; } } $o = new b(); $o->test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5CHep
function name:  (null)
number of ops:  6
compiled vars:  !0 = $o
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   NEW                                                  $1      'b'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   12     3        INIT_METHOD_CALL                                             !0, 'test'
          4        DO_FCALL                                          0          
          5      > RETURN                                                       1

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

End of function c

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5CHep
function name:  test
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   INIT_METHOD_CALL                                             'c'
          1        DO_FCALL                                          0          
    6     2      > RETURN                                                       null

End of function test

End of class a.

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

End of function c

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5CHep
function name:  test
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   INIT_METHOD_CALL                                             'c'
          1        DO_FCALL                                          0          
    6     2      > RETURN                                                       null

End of function test

End of class b.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
124.41 ms | 476 KiB | 7 Q