3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { public function get() { echo 'C'; static::get(); } public function save() { self::get(); } } class B extends C { public function get() { echo 'B'; static::get(); } } class A extends B { public function 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/lJN58
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/lJN58
function name:  get
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                     'C'
    8     1        INIT_STATIC_METHOD_CALL                                  'get'
          2        DO_FCALL                                      0          
    9     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/lJN58
function name:  save
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_STATIC_METHOD_CALL                                  'get'
          1        DO_FCALL                                      0          
   14     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/lJN58
function name:  get
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   ECHO                                                     'B'
   22     1        INIT_STATIC_METHOD_CALL                                  'get'
          2        DO_FCALL                                      0          
   23     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/lJN58
function name:  save
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_STATIC_METHOD_CALL                                  'get'
          1        DO_FCALL                                      0          
   14     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/lJN58
function name:  get
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   30     0  E >   ECHO                                                     'A'
   31     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/lJN58
function name:  save
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_STATIC_METHOD_CALL                                  'get'
          1        DO_FCALL                                      0          
   14     2      > RETURN                                                   null

End of function save

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.05 ms | 1399 KiB | 13 Q