3v4l.org

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

Class Model: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.55 ms | 1393 KiB | 13 Q