3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(-1); class A { static $i=1; static function F() { echo self::$i."\n"; echo __CLASS__; } } class B extends A { static $i=2; static function F(){ echo self::$i."\t".__CLASS__; } } B::F();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3bOrM
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                                                 
   17     3        INIT_STATIC_METHOD_CALL                                  'B', 'F'
          4        DO_FCALL                                      0          
          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/3bOrM
function name:  F
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'i'
          1        CONCAT                                           ~1      ~0, '%0A'
          2        ECHO                                                     ~1
    7     3        ECHO                                                     'A'
    8     4      > 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/3bOrM
function name:  F
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'i'
          1        CONCAT                                           ~1      ~0, '%09'
          2        CONCAT                                           ~2      ~1, 'B'
          3        ECHO                                                     ~2
   14     4      > RETURN                                                   null

End of function f

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.58 ms | 1395 KiB | 15 Q