3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class xyz { static $var; public static function setVar($value) { xyz::$var = $value; } } class one extends xyz {} class two extends xyz {} class three extends xyz {} call_user_func('one::setVar', 'first'); echo one::$var."\n"; call_user_func('two::setVar', 'second'); echo two::$var."\n"; call_user_func('three::setVar', 'third'); echo three::$var."\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GKmUr
function name:  (null)
number of ops:  19
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_USER_CALL                                1          'call_user_func', 'one%3A%3AsetVar'
          1        SEND_USER                                                'first'
          2        DO_FCALL                                      0          
   18     3        FETCH_STATIC_PROP_R          unknown             ~1      'var'
          4        CONCAT                                           ~2      ~1, '%0A'
          5        ECHO                                                     ~2
   19     6        INIT_USER_CALL                                1          'call_user_func', 'two%3A%3AsetVar'
          7        SEND_USER                                                'second'
          8        DO_FCALL                                      0          
   20     9        FETCH_STATIC_PROP_R          unknown             ~4      'var'
         10        CONCAT                                           ~5      ~4, '%0A'
         11        ECHO                                                     ~5
   21    12        INIT_USER_CALL                                1          'call_user_func', 'three%3A%3AsetVar'
         13        SEND_USER                                                'third'
         14        DO_FCALL                                      0          
   22    15        FETCH_STATIC_PROP_R          unknown             ~7      'var'
         16        CONCAT                                           ~8      ~7, '%0A'
         17        ECHO                                                     ~8
         18      > RETURN                                                   1

Class xyz:
Function setvar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GKmUr
function name:  setVar
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        ASSIGN_STATIC_PROP                                       'var', 'xyz'
          2        OP_DATA                                                  !0
    9     3      > RETURN                                                   null

End of function setvar

End of class xyz.

Class one:
Function setvar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GKmUr
function name:  setVar
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        ASSIGN_STATIC_PROP                                       'var', 'xyz'
          2        OP_DATA                                                  !0
    9     3      > RETURN                                                   null

End of function setvar

End of class one.

Class two:
Function setvar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GKmUr
function name:  setVar
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        ASSIGN_STATIC_PROP                                       'var', 'xyz'
          2        OP_DATA                                                  !0
    9     3      > RETURN                                                   null

End of function setvar

End of class two.

Class three:
Function setvar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GKmUr
function name:  setVar
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        ASSIGN_STATIC_PROP                                       'var', 'xyz'
          2        OP_DATA                                                  !0
    9     3      > RETURN                                                   null

End of function setvar

End of class three.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
131.93 ms | 1414 KiB | 13 Q