3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { private static $a = 1; public static function foo() { echo static::$a; } } class B extends A { private static $a = 3; } echo B::foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Do0Ck
function name:  (null)
number of ops:  7
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   4     0  E >   NOP                                                      
  13     1        NOP                                                      
         2        NOP                                                      
  18     3        INIT_STATIC_METHOD_CALL                                  'B', 'foo'
         4        DO_FCALL                                      0  $3      
         5        ECHO                                                     $3
         6      > RETURN                                                   1

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

End of function foo

End of class A.

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

End of function foo

End of class B.

Generated using Vulcan Logic Dumper, using php 7.3.0