3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class A { static $what; static function change_what($where) { static::$what = $where; } static function show() { echo static::$what . PHP_EOL; } } class B extends A { static function change_what($where) { parent::change_what($where); } } class C extends A { static function change_what($where) { parent::change_what($where); } } B::change_what("b"); C::change_what("c"); B::show(); C::show();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LL1Qg
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   INIT_STATIC_METHOD_CALL                                  'B', 'change_what'
          1        SEND_VAL                                                 'b'
          2        DO_FCALL                                      0          
   27     3        INIT_STATIC_METHOD_CALL                                  'C', 'change_what'
          4        SEND_VAL                                                 'c'
          5        DO_FCALL                                      0          
   28     6        INIT_STATIC_METHOD_CALL                                  'B', 'show'
          7        DO_FCALL                                      0          
   29     8        INIT_STATIC_METHOD_CALL                                  'C', 'show'
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

Class A:
Function change_what:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LL1Qg
function name:  change_what
number of ops:  4
compiled vars:  !0 = $where
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        ASSIGN_STATIC_PROP                                       'what'
          2        OP_DATA                                                  !0
    7     3      > RETURN                                                   null

End of function change_what

Function show:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LL1Qg
function name:  show
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'what'
          1        CONCAT                                           ~1      ~0, '%0A'
          2        ECHO                                                     ~1
   11     3      > RETURN                                                   null

End of function show

End of class A.

Class B:
Function change_what:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LL1Qg
function name:  change_what
number of ops:  5
compiled vars:  !0 = $where
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
   16     1        INIT_STATIC_METHOD_CALL                                  'change_what'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
   17     4      > RETURN                                                   null

End of function change_what

Function show:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LL1Qg
function name:  show
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'what'
          1        CONCAT                                           ~1      ~0, '%0A'
          2        ECHO                                                     ~1
   11     3      > RETURN                                                   null

End of function show

End of class B.

Class C:
Function change_what:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LL1Qg
function name:  change_what
number of ops:  5
compiled vars:  !0 = $where
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   RECV                                             !0      
   22     1        INIT_STATIC_METHOD_CALL                                  'change_what'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
   23     4      > RETURN                                                   null

End of function change_what

Function show:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LL1Qg
function name:  show
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'what'
          1        CONCAT                                           ~1      ~0, '%0A'
          2        ECHO                                                     ~1
   11     3      > RETURN                                                   null

End of function show

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.48 ms | 1390 KiB | 13 Q