3v4l.org

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

Class ParentClass:
Function staticvariable:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j7MnM
function name:  staticVariable
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'static'
          1        ECHO                                                     ~0
          2        ECHO                                                     '%0A'
   12     3      > 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/j7MnM
function name:  selfVariable
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'static'
          1        ECHO                                                     ~0
          2        ECHO                                                     '%0A'
   17     3      > RETURN                                                   null

End of function selfvariable

End of class ParentClass.

Class ChildClass:
Function staticvariable:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j7MnM
function name:  staticVariable
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'static'
          1        ECHO                                                     ~0
          2        ECHO                                                     '%0A'
   28     3      > 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/j7MnM
function name:  selfVariable
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'static'
          1        ECHO                                                     ~0
          2        ECHO                                                     '%0A'
   33     3      > RETURN                                                   null

End of function selfvariable

End of class ChildClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
189.16 ms | 1399 KiB | 13 Q