3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(-1); class GrandMother { function f() { echo __METHOD__; } } class Mother extends GrandMother { function f() { echo __METHOD__; } } class Child extends Mother { function f() { GrandMother::f(); } } $c = new Child; $c->f();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hGZ2l
function name:  (null)
number of ops:  9
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 -1
          2        DO_ICALL                                                 
   22     3        NEW                                              $2      'Child'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
   23     6        INIT_METHOD_CALL                                         !0, 'f'
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

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

End of function f

End of class GrandMother.

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

End of function f

End of class Mother.

Class Child:
Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hGZ2l
function name:  f
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_STATIC_METHOD_CALL                                  'GrandMother', 'f'
          1        DO_FCALL                                      0          
   20     2      > RETURN                                                   null

End of function f

End of class Child.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
186.22 ms | 1395 KiB | 15 Q