3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Grandparent{ protected static $data = array( 'default', ); public static function filter(){ $variables = get_class_vars ( get_called_class() ); var_dump($variables['data']); } } class ParentClass extends Grandparent{ protected static $data = array( 'one', 'two', ); } class Child extends ParentClass{ } child::filter();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GlNEp
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   INIT_STATIC_METHOD_CALL                                  'child', 'filter'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Class Grandparent:
Function filter:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GlNEp
function name:  filter
number of ops:  10
compiled vars:  !0 = $variables
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'get_class_vars'
          1        GET_CALLED_CLASS                                 ~1      
          2        SEND_VAL                                                 ~1
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !0, $2
    9     5        INIT_FCALL                                               'var_dump'
          6        FETCH_DIM_R                                      ~4      !0, 'data'
          7        SEND_VAL                                                 ~4
          8        DO_ICALL                                                 
   10     9      > RETURN                                                   null

End of function filter

End of class Grandparent.

Class ParentClass:
Function filter:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GlNEp
function name:  filter
number of ops:  10
compiled vars:  !0 = $variables
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'get_class_vars'
          1        GET_CALLED_CLASS                                 ~1      
          2        SEND_VAL                                                 ~1
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !0, $2
    9     5        INIT_FCALL                                               'var_dump'
          6        FETCH_DIM_R                                      ~4      !0, 'data'
          7        SEND_VAL                                                 ~4
          8        DO_ICALL                                                 
   10     9      > RETURN                                                   null

End of function filter

End of class ParentClass.

Class Child:
Function filter:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GlNEp
function name:  filter
number of ops:  10
compiled vars:  !0 = $variables
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'get_class_vars'
          1        GET_CALLED_CLASS                                 ~1      
          2        SEND_VAL                                                 ~1
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !0, $2
    9     5        INIT_FCALL                                               'var_dump'
          6        FETCH_DIM_R                                      ~4      !0, 'data'
          7        SEND_VAL                                                 ~4
          8        DO_ICALL                                                 
   10     9      > RETURN                                                   null

End of function filter

End of class Child.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.54 ms | 1400 KiB | 17 Q