3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class parentc { protected static $config=1; protected static $db; } class x extends parentc { public function __construct() { static::$config='x'; echo (static::$config); } public function echoc() { echo (static::$config); } } class y extends parentc { public function __construct() { static::$config='y'; echo (static::$config); } public function echoc() { echo (static::$config); } } $x=new x(); $y=new y(); $x->echoc();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3qv9Z
function name:  (null)
number of ops:  9
compiled vars:  !0 = $x, !1 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   40     0  E >   NEW                                              $2      'x'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   41     3        NEW                                              $5      'y'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   42     6        INIT_METHOD_CALL                                         !0, 'echoc'
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Class parentc: [no user functions]
Class x:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3qv9Z
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   ASSIGN_STATIC_PROP                                       'config'
          1        OP_DATA                                                  'x'
   16     2        FETCH_STATIC_PROP_R          unknown             ~1      'config'
          3        ECHO                                                     ~1
   19     4      > RETURN                                                   null

End of function __construct

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

End of function echoc

End of class x.

Class y:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3qv9Z
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   ASSIGN_STATIC_PROP                                       'config'
          1        OP_DATA                                                  'y'
   29     2        FETCH_STATIC_PROP_R          unknown             ~1      'config'
          3        ECHO                                                     ~1
   31     4      > RETURN                                                   null

End of function __construct

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

End of function echoc

End of class y.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
211.25 ms | 1399 KiB | 13 Q