3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $a; protected $b; public $c; protected $e; public $f; } class B extends A { private $a; protected $b; public $c; } $a = new \ReflectionProperty('\B', 'a'); $b = new \ReflectionProperty('\B', 'b'); $c = new \ReflectionProperty('\B', 'c'); $e = new \ReflectionProperty('\B', 'e'); $f = new \ReflectionProperty('\B', 'f'); var_dump($a->class); var_dump($a->getDeclaringClass()->getName()); var_dump($b->class); var_dump($b->getDeclaringClass()->getName()); var_dump($c->class); var_dump($c->getDeclaringClass()->getName()); var_dump($e->class); var_dump($e->getDeclaringClass()->getName()); var_dump($f->class); var_dump($f->getDeclaringClass()->getName());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kVPNF
function name:  (null)
number of ops:  81
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $e, !4 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   NEW                                              $5      'ReflectionProperty'
          1        SEND_VAL_EX                                              '%5CB'
          2        SEND_VAL_EX                                              'a'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $5
   26     5        NEW                                              $8      'ReflectionProperty'
          6        SEND_VAL_EX                                              '%5CB'
          7        SEND_VAL_EX                                              'b'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $8
   27    10        NEW                                              $11     'ReflectionProperty'
         11        SEND_VAL_EX                                              '%5CB'
         12        SEND_VAL_EX                                              'c'
         13        DO_FCALL                                      0          
         14        ASSIGN                                                   !2, $11
   28    15        NEW                                              $14     'ReflectionProperty'
         16        SEND_VAL_EX                                              '%5CB'
         17        SEND_VAL_EX                                              'e'
         18        DO_FCALL                                      0          
         19        ASSIGN                                                   !3, $14
   29    20        NEW                                              $17     'ReflectionProperty'
         21        SEND_VAL_EX                                              '%5CB'
         22        SEND_VAL_EX                                              'f'
         23        DO_FCALL                                      0          
         24        ASSIGN                                                   !4, $17
   31    25        INIT_FCALL                                               'var_dump'
         26        FETCH_OBJ_R                                      ~20     !0, 'class'
         27        SEND_VAL                                                 ~20
         28        DO_ICALL                                                 
   32    29        INIT_FCALL                                               'var_dump'
         30        INIT_METHOD_CALL                                         !0, 'getDeclaringClass'
         31        DO_FCALL                                      0  $22     
         32        INIT_METHOD_CALL                                         $22, 'getName'
         33        DO_FCALL                                      0  $23     
         34        SEND_VAR                                                 $23
         35        DO_ICALL                                                 
   33    36        INIT_FCALL                                               'var_dump'
         37        FETCH_OBJ_R                                      ~25     !1, 'class'
         38        SEND_VAL                                                 ~25
         39        DO_ICALL                                                 
   34    40        INIT_FCALL                                               'var_dump'
         41        INIT_METHOD_CALL                                         !1, 'getDeclaringClass'
         42        DO_FCALL                                      0  $27     
         43        INIT_METHOD_CALL                                         $27, 'getName'
         44        DO_FCALL                                      0  $28     
         45        SEND_VAR                                                 $28
         46        DO_ICALL                                                 
   35    47        INIT_FCALL                                               'var_dump'
         48        FETCH_OBJ_R                                      ~30     !2, 'class'
         49        SEND_VAL                                                 ~30
         50        DO_ICALL                                                 
   36    51        INIT_FCALL                                               'var_dump'
         52        INIT_METHOD_CALL                                         !2, 'getDeclaringClass'
         53        DO_FCALL                                      0  $32     
         54        INIT_METHOD_CALL                                         $32, 'getName'
         55        DO_FCALL                                      0  $33     
         56        SEND_VAR                                                 $33
         57        DO_ICALL                                                 
   38    58        INIT_FCALL                                               'var_dump'
         59        FETCH_OBJ_R                                      ~35     !3, 'class'
         60        SEND_VAL                                                 ~35
         61        DO_ICALL                                                 
   39    62        INIT_FCALL                                               'var_dump'
         63        INIT_METHOD_CALL                                         !3, 'getDeclaringClass'
         64        DO_FCALL                                      0  $37     
         65        INIT_METHOD_CALL                                         $37, 'getName'
         66        DO_FCALL                                      0  $38     
         67        SEND_VAR                                                 $38
         68        DO_ICALL                                                 
   40    69        INIT_FCALL                                               'var_dump'
         70        FETCH_OBJ_R                                      ~40     !4, 'class'
         71        SEND_VAL                                                 ~40
         72        DO_ICALL                                                 
   41    73        INIT_FCALL                                               'var_dump'
         74        INIT_METHOD_CALL                                         !4, 'getDeclaringClass'
         75        DO_FCALL                                      0  $42     
         76        INIT_METHOD_CALL                                         $42, 'getName'
         77        DO_FCALL                                      0  $43     
         78        SEND_VAR                                                 $43
         79        DO_ICALL                                                 
         80      > RETURN                                                   1

Class A: [no user functions]
Class B: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.27 ms | 941 KiB | 16 Q