3v4l.org

run code in 500+ PHP versions simultaneously
<?php class C { public function get() { echo 'C'; } public function save() { static::get(); } } class B extends C { public function get() { parent::get(); echo 'B'; } } class A extends B { public function get() { parent::get(); echo 'A'; } } $x = new A(); $x->save();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/J96NZ
function name:  (null)
number of ops:  6
compiled vars:  !0 = $x
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   34     0  E >   NEW                                                  $1      'A'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   35     3        INIT_METHOD_CALL                                             !0, 'save'
          4        DO_FCALL                                          0          
          5      > RETURN                                                       1

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

End of function get

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

End of function save

End of class C.

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

End of function get

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

End of function save

End of class B.

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

End of function get

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

End of function save

End of class A.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
168.59 ms | 2818 KiB | 12 Q