3v4l.org

run code in 500+ PHP versions simultaneously
<?php declare(strict_types=1); class Test { public string $property = ''; } $test = new Test(); $refProp = new \ReflectionProperty(Test::class, 'property'); $refProp->setValue($test, 3); var_dump($test->property); $test->property = 3;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/m0Te8
function name:  (null)
number of ops:  19
compiled vars:  !0 = $test, !1 = $refProp
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   NEW                                                  $2      'Test'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $2
   12     3        NEW                                                  $5      'ReflectionProperty'
          4        SEND_VAL_EX                                                  'Test'
          5        SEND_VAL_EX                                                  'property'
          6        DO_FCALL                                          0          
          7        ASSIGN                                                       !1, $5
   13     8        INIT_METHOD_CALL                                             !1, 'setValue'
          9        SEND_VAR_EX                                                  !0
         10        SEND_VAL_EX                                                  3
         11        DO_FCALL                                          0          
   15    12        INIT_FCALL                                                   'var_dump'
         13        FETCH_OBJ_R                                          ~9      !0, 'property'
         14        SEND_VAL                                                     ~9
         15        DO_ICALL                                                     
   17    16        ASSIGN_OBJ                                                   !0, 'property'
         17        OP_DATA                                                      3
   18    18      > RETURN                                                       1

Class Test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
125.73 ms | 477 KiB | 8 Q