3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { function alive() { echo "dog!"; } } class b extends a { function doIt() { static::alive(); } } class c extends b { function alive() { echo "dead!"; } function fun() { self::doIt(); } } $c = new C; $c->fun();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7JCCc
function name:  (null)
number of ops:  6
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   33     0  E >   NEW                                              $1      'C'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   35     3        INIT_METHOD_CALL                                         !0, 'fun'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

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

End of function alive

End of class a.

Class b:
Function doit:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7JCCc
function name:  doIt
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_STATIC_METHOD_CALL                                  'alive'
          1        DO_FCALL                                      0          
   16     2      > RETURN                                                   null

End of function doit

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

End of function alive

End of class b.

Class c:
Function alive:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7JCCc
function name:  alive
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   ECHO                                                     'dead%21'
   24     1      > RETURN                                                   null

End of function alive

Function fun:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7JCCc
function name:  fun
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   INIT_STATIC_METHOD_CALL                                  'doIt'
          1        DO_FCALL                                      0          
   28     2      > RETURN                                                   null

End of function fun

Function doit:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7JCCc
function name:  doIt
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_STATIC_METHOD_CALL                                  'alive'
          1        DO_FCALL                                      0          
   16     2      > RETURN                                                   null

End of function doit

End of class c.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.92 ms | 1399 KiB | 13 Q