3v4l.org

run code in 300+ PHP versions simultaneously
<?php class X { static protected $var; } class XA extends X { static public function setVar($v) { self::$var = $v; } static public function getVar() { self::$var; } } class XB extends X { static public function setVar($v) { self::$var = $v; } static public function getVar() { self::$var; } } XA::setVar(1); echo XA::getVar();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NZVDQ
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   33     0  E >   INIT_STATIC_METHOD_CALL                                  'XA', 'setVar'
          1        SEND_VAL                                                 1
          2        DO_FCALL                                      0          
   34     3        INIT_STATIC_METHOD_CALL                                  'XA', 'getVar'
          4        DO_FCALL                                      0  $1      
          5        ECHO                                                     $1
          6      > RETURN                                                   1

Class X: [no user functions]
Class XA:
Function setvar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NZVDQ
function name:  setVar
number of ops:  4
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
   10     1        ASSIGN_STATIC_PROP                                       'var'
          2        OP_DATA                                                  !0
   11     3      > RETURN                                                   null

End of function setvar

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

End of function getvar

End of class XA.

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

End of function setvar

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

End of function getvar

End of class XB.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.77 ms | 1386 KiB | 13 Q