3v4l.org

run code in 500+ PHP versions simultaneously
<?php class A { private static $a = 1; private static function a() {} public static function test() { var_dump(self::$a); var_dump(B::$a); var_dump(static::$a); } } class B extends A { protected static $a = 2; protected static function a() {} } class C extends B { public static $a = 3; public static function a() {} } C::test(); C::a();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MS73Y
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   28     0  E >   INIT_STATIC_METHOD_CALL                                      'C', 'test'
          1        DO_FCALL                                          0          
   29     2        INIT_STATIC_METHOD_CALL                                      'C', 'a'
          3        DO_FCALL                                          0          
          4      > RETURN                                                       1

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

End of function a

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MS73Y
function name:  test
number of ops:  13
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                                   'var_dump'
          1        FETCH_STATIC_PROP_R              global lock         ~0      'a'
          2        SEND_VAL                                                     ~0
          3        DO_ICALL                                                     
   11     4        INIT_FCALL                                                   'var_dump'
          5        FETCH_STATIC_PROP_R              unknown             ~2      'a'
          6        SEND_VAL                                                     ~2
          7        DO_ICALL                                                     
   12     8        INIT_FCALL                                                   'var_dump'
          9        FETCH_STATIC_PROP_R              unknown             ~4      'a'
         10        SEND_VAL                                                     ~4
         11        DO_ICALL                                                     
   13    12      > RETURN                                                       null

End of function test

End of class A.

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

End of function a

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MS73Y
function name:  test
number of ops:  13
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                                   'var_dump'
          1        FETCH_STATIC_PROP_R              global lock         ~0      'a'
          2        SEND_VAL                                                     ~0
          3        DO_ICALL                                                     
   11     4        INIT_FCALL                                                   'var_dump'
          5        FETCH_STATIC_PROP_R              unknown             ~2      'a'
          6        SEND_VAL                                                     ~2
          7        DO_ICALL                                                     
   12     8        INIT_FCALL                                                   'var_dump'
          9        FETCH_STATIC_PROP_R              unknown             ~4      'a'
         10        SEND_VAL                                                     ~4
         11        DO_ICALL                                                     
   13    12      > RETURN                                                       null

End of function test

End of class B.

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

End of function a

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MS73Y
function name:  test
number of ops:  13
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                                   'var_dump'
          1        FETCH_STATIC_PROP_R              global lock         ~0      'a'
          2        SEND_VAL                                                     ~0
          3        DO_ICALL                                                     
   11     4        INIT_FCALL                                                   'var_dump'
          5        FETCH_STATIC_PROP_R              unknown             ~2      'a'
          6        SEND_VAL                                                     ~2
          7        DO_ICALL                                                     
   12     8        INIT_FCALL                                                   'var_dump'
          9        FETCH_STATIC_PROP_R              unknown             ~4      'a'
         10        SEND_VAL                                                     ~4
         11        DO_ICALL                                                     
   13    12      > RETURN                                                       null

End of function test

End of class C.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
155.45 ms | 1338 KiB | 14 Q