3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ClassName { private $property = 42; } $obj = new ClassName(); var_dump($obj); $refObject = new ReflectionObject( $obj ); $refProperty = $refObject->getProperty( 'property' ); $refProperty->setAccessible( true ); $refProperty->setValue(null, 'new value'); var_dump($obj);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IGot4
function name:  (null)
number of ops:  25
compiled vars:  !0 = $obj, !1 = $refObject, !2 = $refProperty
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $3      'ClassName'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   11     3        INIT_FCALL                                               'var_dump'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
   13     6        NEW                                              $7      'ReflectionObject'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $7
   14    10        INIT_METHOD_CALL                                         !1, 'getProperty'
         11        SEND_VAL_EX                                              'property'
         12        DO_FCALL                                      0  $10     
         13        ASSIGN                                                   !2, $10
   15    14        INIT_METHOD_CALL                                         !2, 'setAccessible'
         15        SEND_VAL_EX                                              <true>
         16        DO_FCALL                                      0          
   16    17        INIT_METHOD_CALL                                         !2, 'setValue'
         18        SEND_VAL_EX                                              null
         19        SEND_VAL_EX                                              'new+value'
         20        DO_FCALL                                      0          
   18    21        INIT_FCALL                                               'var_dump'
         22        SEND_VAR                                                 !0
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Class ClassName: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.94 ms | 1395 KiB | 15 Q