3v4l.org

run code in 300+ PHP versions simultaneously
<?php class GrandPa { protected function age() { return 80; } } class Pa extends GrandPa { protected function age() { return 50; } } class Junior extends Pa { public function __construct() { echo GrandPa::age(); } } new Junior();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AlQR1
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   NEW                                              $0      'Junior'
          1        DO_FCALL                                      0          
          2        FREE                                                     $0
          3      > RETURN                                                   1

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

End of function age

End of class GrandPa.

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

End of function age

End of class Pa.

Class Junior:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AlQR1
function name:  __construct
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   INIT_STATIC_METHOD_CALL                                  'GrandPa', 'age'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
   25     3      > RETURN                                                   null

End of function __construct

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

End of function age

End of class Junior.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.15 ms | 1395 KiB | 13 Q