3v4l.org

run code in 500+ PHP versions simultaneously
<?php class a { function x() { echo 'x' . chr(10); } } class b extends a { function y() { echo 'y' . chr(10); self::x(); $this->x(); } } class c extends b { function z() { echo 'z' . chr(10); self::y(); } function x() { echo 'x2' . chr(10); } } echo (new c)->z();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TtuJ3
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   29     0  E >   NEW                                                  $0      'c'
          1        DO_FCALL                                          0          
          2        INIT_METHOD_CALL                                             $0, 'z'
          3        DO_FCALL                                          0  $2      
          4        ECHO                                                         $2
          5      > RETURN                                                       1

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

End of function x

End of class a.

Class b:
Function y:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TtuJ3
function name:  y
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   ECHO                                                         'y%0A'
   12     1        INIT_STATIC_METHOD_CALL                                      'x'
          2        DO_FCALL                                          0          
   13     3        INIT_METHOD_CALL                                             'x'
          4        DO_FCALL                                          0          
   14     5      > RETURN                                                       null

End of function y

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

End of function x

End of class b.

Class c:
Function z:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TtuJ3
function name:  z
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   20     0  E >   ECHO                                                         'z%0A'
   21     1        INIT_STATIC_METHOD_CALL                                      'y'
          2        DO_FCALL                                          0          
   22     3      > RETURN                                                       null

End of function z

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

End of function x

Function y:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TtuJ3
function name:  y
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   ECHO                                                         'y%0A'
   12     1        INIT_STATIC_METHOD_CALL                                      'x'
          2        DO_FCALL                                          0          
   13     3        INIT_METHOD_CALL                                             'x'
          4        DO_FCALL                                          0          
   14     5      > RETURN                                                       null

End of function y

End of class c.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
200.03 ms | 1787 KiB | 13 Q