3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public static function getValue() { return 'A class'; } public static function staticVariable() { echo static::getValue(), PHP_EOL; } public static function selfVariable() { echo self::getValue(), PHP_EOL; } } class B extends A { public static function getValue() { return 'B class'; } } A::staticVariable(); B::staticVariable(); A::selfVariable(); B::selfVariable();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/meMXD
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   INIT_STATIC_METHOD_CALL                                  'A', 'staticVariable'
          1        DO_FCALL                                      0          
   30     2        INIT_STATIC_METHOD_CALL                                  'B', 'staticVariable'
          3        DO_FCALL                                      0          
   31     4        INIT_STATIC_METHOD_CALL                                  'A', 'selfVariable'
          5        DO_FCALL                                      0          
   32     6        INIT_STATIC_METHOD_CALL                                  'B', 'selfVariable'
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

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

End of function getvalue

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

End of function staticvariable

Function selfvariable:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/meMXD
function name:  selfVariable
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_STATIC_METHOD_CALL                                  'getValue'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
          3        ECHO                                                     '%0A'
   18     4      > RETURN                                                   null

End of function selfvariable

End of class A.

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

End of function getvalue

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

End of function staticvariable

Function selfvariable:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/meMXD
function name:  selfVariable
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_STATIC_METHOD_CALL                                  'getValue'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
          3        ECHO                                                     '%0A'
   18     4      > RETURN                                                   null

End of function selfvariable

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.04 ms | 944 KiB | 14 Q