3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(-1); class A { static $i=1; static function F() { echo self::$i; } } class B extends A { static $i=2; static function F() { echo self::$i; } } echo B::$i;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j4QWY
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 -1
          2        DO_ICALL                                                 
   16     3        FETCH_STATIC_PROP_R          global lock         ~1      'i'
          4        ECHO                                                     ~1
          5      > RETURN                                                   1

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

End of function f

End of class A.

Class B:
Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j4QWY
function name:  F
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'i'
          1        ECHO                                                     ~0
   13     2      > RETURN                                                   null

End of function f

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.2 ms | 1395 KiB | 15 Q