3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected static $a = 'Z'; public static function test() { echo self::$a.PHP_EOL; } public static function test2() { echo static::$a.PHP_EOL; } } class B extends A { protected static $a = 'Y'; public static function test3() { echo self::$a.PHP_EOL; } public static function test4() { echo static::$a.PHP_EOL; } } B::test(); B::test2(); B::test3(); B::test4();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dhpto
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   INIT_STATIC_METHOD_CALL                                  'B', 'test'
          1        DO_FCALL                                      0          
   21     2        INIT_STATIC_METHOD_CALL                                  'B', 'test2'
          3        DO_FCALL                                      0          
   22     4        INIT_STATIC_METHOD_CALL                                  'B', 'test3'
          5        DO_FCALL                                      0          
   23     6        INIT_STATIC_METHOD_CALL                                  'B', 'test4'
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Class A:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dhpto
function name:  test
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'a'
          1        CONCAT                                           ~1      ~0, '%0A'
          2        ECHO                                                     ~1
    6     3      > RETURN                                                   null

End of function test

Function test2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dhpto
function name:  test2
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'a'
          1        CONCAT                                           ~1      ~0, '%0A'
          2        ECHO                                                     ~1
    9     3      > RETURN                                                   null

End of function test2

End of class A.

Class B:
Function test3:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dhpto
function name:  test3
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'a'
          1        CONCAT                                           ~1      ~0, '%0A'
          2        ECHO                                                     ~1
   15     3      > RETURN                                                   null

End of function test3

Function test4:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dhpto
function name:  test4
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'a'
          1        CONCAT                                           ~1      ~0, '%0A'
          2        ECHO                                                     ~1
   18     3      > RETURN                                                   null

End of function test4

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dhpto
function name:  test
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'a'
          1        CONCAT                                           ~1      ~0, '%0A'
          2        ECHO                                                     ~1
    6     3      > RETURN                                                   null

End of function test

Function test2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dhpto
function name:  test2
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'a'
          1        CONCAT                                           ~1      ~0, '%0A'
          2        ECHO                                                     ~1
    9     3      > RETURN                                                   null

End of function test2

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.26 ms | 1399 KiB | 13 Q