3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private static function VALUE1(){ return 'func'; } private static $VALUE2 = 'var'; private const VALUE3 = 'cost'; public static function func_value(){ return static::VALUE1(); } public static function member_value(){ return static::$VALUE2; } public static function const_value(){ return static::VALUE3; } } class B extends A { } echo A::func_value(); echo "\n"; echo B::func_value(); echo "\n---\n"; echo A::member_value(); echo "\n"; echo B::member_value(); echo "\n---\n"; echo A::const_value(); echo "\n"; echo B::const_value();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HiPuc
function name:  (null)
number of ops:  24
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   INIT_STATIC_METHOD_CALL                                  'A', 'func_value'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
   30     3        ECHO                                                     '%0A'
   31     4        INIT_STATIC_METHOD_CALL                                  'B', 'func_value'
          5        DO_FCALL                                      0  $1      
          6        ECHO                                                     $1
   33     7        ECHO                                                     '%0A---%0A'
   35     8        INIT_STATIC_METHOD_CALL                                  'A', 'member_value'
          9        DO_FCALL                                      0  $2      
         10        ECHO                                                     $2
   36    11        ECHO                                                     '%0A'
   37    12        INIT_STATIC_METHOD_CALL                                  'B', 'member_value'
         13        DO_FCALL                                      0  $3      
         14        ECHO                                                     $3
   39    15        ECHO                                                     '%0A---%0A'
   41    16        INIT_STATIC_METHOD_CALL                                  'A', 'const_value'
         17        DO_FCALL                                      0  $4      
         18        ECHO                                                     $4
   42    19        ECHO                                                     '%0A'
   43    20        INIT_STATIC_METHOD_CALL                                  'B', 'const_value'
         21        DO_FCALL                                      0  $5      
         22        ECHO                                                     $5
         23      > RETURN                                                   1

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

End of function value1

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

End of function func_value

Function member_value:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HiPuc
function name:  member_value
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'VALUE2'
          1      > RETURN                                                   ~0
   19     2*     > RETURN                                                   null

End of function member_value

Function const_value:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HiPuc
function name:  const_value
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   FETCH_CLASS_CONSTANT                             ~0      'VALUE3'
          1      > RETURN                                                   ~0
   23     2*     > RETURN                                                   null

End of function const_value

End of class A.

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

End of function value1

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

End of function func_value

Function member_value:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HiPuc
function name:  member_value
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'VALUE2'
          1      > RETURN                                                   ~0
   19     2*     > RETURN                                                   null

End of function member_value

Function const_value:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HiPuc
function name:  const_value
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   FETCH_CLASS_CONSTANT                             ~0      'VALUE3'
          1      > RETURN                                                   ~0
   23     2*     > RETURN                                                   null

End of function const_value

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.31 ms | 1399 KiB | 13 Q