3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Base { protected static function whoami() { echo "Base "; } public static function whoareyou() { static::whoami(); } } class A extends Base { public static function test() { Base::whoareyou(); self::whoareyou(); parent::whoareyou(); A::whoreareyou(); static::whoareyou(); } public static function whoami() { echo "A "; } } class B extends A { public static function whoami() { echo "B "; } } B::test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aleQS
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   33     0  E >   INIT_STATIC_METHOD_CALL                                  'B', 'test'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Class Base:
Function whoami:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aleQS
function name:  whoami
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ECHO                                                     'Base+'
    5     1      > RETURN                                                   null

End of function whoami

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

End of function whoareyou

End of class Base.

Class A:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aleQS
function name:  test
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_STATIC_METHOD_CALL                                  'Base', 'whoareyou'
          1        DO_FCALL                                      0          
   15     2        INIT_STATIC_METHOD_CALL                                  'whoareyou'
          3        DO_FCALL                                      0          
   16     4        INIT_STATIC_METHOD_CALL                                  'whoareyou'
          5        DO_FCALL                                      0          
   17     6        INIT_STATIC_METHOD_CALL                                  'A', 'whoreareyou'
          7        DO_FCALL                                      0          
   18     8        INIT_STATIC_METHOD_CALL                                  'whoareyou'
          9        DO_FCALL                                      0          
   19    10      > RETURN                                                   null

End of function test

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

End of function whoami

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

End of function whoareyou

End of class A.

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

End of function whoami

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aleQS
function name:  test
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_STATIC_METHOD_CALL                                  'Base', 'whoareyou'
          1        DO_FCALL                                      0          
   15     2        INIT_STATIC_METHOD_CALL                                  'whoareyou'
          3        DO_FCALL                                      0          
   16     4        INIT_STATIC_METHOD_CALL                                  'whoareyou'
          5        DO_FCALL                                      0          
   17     6        INIT_STATIC_METHOD_CALL                                  'A', 'whoreareyou'
          7        DO_FCALL                                      0          
   18     8        INIT_STATIC_METHOD_CALL                                  'whoareyou'
          9        DO_FCALL                                      0          
   19    10      > RETURN                                                   null

End of function test

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

End of function whoareyou

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.41 ms | 1399 KiB | 13 Q