3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $a; protected $b; public $c; } 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'); 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());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Gt0ll
function name:  (null)
number of ops:  49
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   NEW                                              $3      'ReflectionProperty'
          1        SEND_VAL_EX                                              '%5CB'
          2        SEND_VAL_EX                                              'a'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $3
   22     5        NEW                                              $6      'ReflectionProperty'
          6        SEND_VAL_EX                                              '%5CB'
          7        SEND_VAL_EX                                              'b'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $6
   23    10        NEW                                              $9      'ReflectionProperty'
         11        SEND_VAL_EX                                              '%5CB'
         12        SEND_VAL_EX                                              'c'
         13        DO_FCALL                                      0          
         14        ASSIGN                                                   !2, $9
   25    15        INIT_FCALL                                               'var_dump'
         16        FETCH_OBJ_R                                      ~12     !0, 'class'
         17        SEND_VAL                                                 ~12
         18        DO_ICALL                                                 
   26    19        INIT_FCALL                                               'var_dump'
         20        INIT_METHOD_CALL                                         !0, 'getDeclaringClass'
         21        DO_FCALL                                      0  $14     
         22        INIT_METHOD_CALL                                         $14, 'getName'
         23        DO_FCALL                                      0  $15     
         24        SEND_VAR                                                 $15
         25        DO_ICALL                                                 
   27    26        INIT_FCALL                                               'var_dump'
         27        FETCH_OBJ_R                                      ~17     !1, 'class'
         28        SEND_VAL                                                 ~17
         29        DO_ICALL                                                 
   28    30        INIT_FCALL                                               'var_dump'
         31        INIT_METHOD_CALL                                         !1, 'getDeclaringClass'
         32        DO_FCALL                                      0  $19     
         33        INIT_METHOD_CALL                                         $19, 'getName'
         34        DO_FCALL                                      0  $20     
         35        SEND_VAR                                                 $20
         36        DO_ICALL                                                 
   29    37        INIT_FCALL                                               'var_dump'
         38        FETCH_OBJ_R                                      ~22     !2, 'class'
         39        SEND_VAL                                                 ~22
         40        DO_ICALL                                                 
   30    41        INIT_FCALL                                               'var_dump'
         42        INIT_METHOD_CALL                                         !2, 'getDeclaringClass'
         43        DO_FCALL                                      0  $24     
         44        INIT_METHOD_CALL                                         $24, 'getName'
         45        DO_FCALL                                      0  $25     
         46        SEND_VAR                                                 $25
         47        DO_ICALL                                                 
         48      > RETURN                                                   1

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.99 ms | 1400 KiB | 15 Q