3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ParentClass { public static function getValue() { return 'Parent class'; } public static function staticVariable() { echo static::getValue(), PHP_EOL; } public static function selfVariable() { echo self::getValue(), PHP_EOL; } } class ChildClass extends ParentClass { public static function getValue() { return 'Child class'; } public static function staticVariable() { echo static::getValue(), PHP_EOL; } public static function selfVariable() { echo self::getValue(), 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/pUppq
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   42     0  E >   INIT_STATIC_METHOD_CALL                                  'ParentClass', 'staticVariable'
          1        DO_FCALL                                      0          
   43     2        INIT_STATIC_METHOD_CALL                                  'ChildClass', 'staticVariable'
          3        DO_FCALL                                      0          
   44     4        INIT_STATIC_METHOD_CALL                                  'ParentClass', 'selfVariable'
          5        DO_FCALL                                      0          
   45     6        INIT_STATIC_METHOD_CALL                                  'ChildClass', 'selfVariable'
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Class ParentClass:
Function getvalue:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pUppq
function name:  getValue
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E > > RETURN                                                   'Parent+class'
   10     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/pUppq
function name:  staticVariable
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_STATIC_METHOD_CALL                                  'getValue'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
          3        ECHO                                                     '%0A'
   15     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/pUppq
function name:  selfVariable
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_STATIC_METHOD_CALL                                  'getValue'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
          3        ECHO                                                     '%0A'
   20     4      > RETURN                                                   null

End of function selfvariable

End of class ParentClass.

Class ChildClass:
Function getvalue:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pUppq
function name:  getValue
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E > > RETURN                                                   'Child+class'
   29     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/pUppq
function name:  staticVariable
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   33     0  E >   INIT_STATIC_METHOD_CALL                                  'getValue'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
          3        ECHO                                                     '%0A'
   34     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/pUppq
function name:  selfVariable
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   38     0  E >   INIT_STATIC_METHOD_CALL                                  'getValue'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
          3        ECHO                                                     '%0A'
   39     4      > RETURN                                                   null

End of function selfvariable

End of class ChildClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
202.71 ms | 1399 KiB | 13 Q