3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $a = 5; } $a = new A(); $rf = new ReflectionClass($a); $pr = $rf->getProperty('a'); $pr->setAccesible(true); echo $a->a;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YbXs9
function name:  (null)
number of ops:  17
compiled vars:  !0 = $a, !1 = $rf, !2 = $pr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $3      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    8     3        NEW                                              $6      'ReflectionClass'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $6
    9     7        INIT_METHOD_CALL                                         !1, 'getProperty'
          8        SEND_VAL_EX                                              'a'
          9        DO_FCALL                                      0  $9      
         10        ASSIGN                                                   !2, $9
   10    11        INIT_METHOD_CALL                                         !2, 'setAccesible'
         12        SEND_VAL_EX                                              <true>
         13        DO_FCALL                                      0          
   11    14        FETCH_OBJ_R                                      ~12     !0, 'a'
         15        ECHO                                                     ~12
         16      > RETURN                                                   1

Class A: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.95 ms | 1393 KiB | 13 Q