3v4l.org

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

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

End of function show

Function seta:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SsD6Y
function name:  seta
number of ops:  4
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     1        ASSIGN_STATIC_PROP                                       'a'
          2        OP_DATA                                                  !0
   12     3      > RETURN                                                   null

End of function seta

End of class I.

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

End of function show

Function seta:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SsD6Y
function name:  seta
number of ops:  4
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     1        ASSIGN_STATIC_PROP                                       'a'
          2        OP_DATA                                                  !0
   12     3      > RETURN                                                   null

End of function seta

End of class A.

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

End of function show

Function seta:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SsD6Y
function name:  seta
number of ops:  4
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     1        ASSIGN_STATIC_PROP                                       'a'
          2        OP_DATA                                                  !0
   12     3      > RETURN                                                   null

End of function seta

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.5 ms | 1399 KiB | 13 Q