3v4l.org

run code in 500+ PHP versions simultaneously
<?php class A { public $prop; } class Unrelated { public $prop; } $r = new ReflectionProperty(A::class, 'prop'); $unrelated = new Unrelated(); $r->setValue($unrelated, 42); var_dump($unrelated);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Tuej7
function name:  (null)
number of ops:  16
compiled vars:  !0 = $r, !1 = $unrelated
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   NEW                                                  $2      'ReflectionProperty'
          1        SEND_VAL_EX                                                  'A'
          2        SEND_VAL_EX                                                  'prop'
          3        DO_FCALL                                          0          
          4        ASSIGN                                                       !0, $2
   12     5        NEW                                                  $5      'Unrelated'
          6        DO_FCALL                                          0          
          7        ASSIGN                                                       !1, $5
   13     8        INIT_METHOD_CALL                                             !0, 'setValue'
          9        SEND_VAR_EX                                                  !1
         10        SEND_VAL_EX                                                  42
         11        DO_FCALL                                          0          
   15    12        INIT_FCALL                                                   'var_dump'
         13        SEND_VAR                                                     !1
         14        DO_ICALL                                                     
         15      > RETURN                                                       1

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

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
156.68 ms | 1527 KiB | 14 Q