3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { static public function a() { return 1; } static public function geta() { return static::a(); } } class B extends A { static public function a() { return 2; } } echo B::geta();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Zi9Vm
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   INIT_STATIC_METHOD_CALL                                  'B', 'geta'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
          3      > RETURN                                                   1

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

End of function a

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

End of function geta

End of class A.

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

End of function a

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

End of function geta

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.92 ms | 1395 KiB | 13 Q