3v4l.org

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

Class Test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.17 ms | 1444 KiB | 14 Q