3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = new stdClass; $foo->bar = 1; var_dump((new ReflectionObject($foo))->getProperties()[0]->getType()->__toString());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2nH6H
function name:  (null)
number of ops:  19
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $1      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    4     3        ASSIGN_OBJ                                               !0, 'bar'
          4        OP_DATA                                                  1
    5     5        INIT_FCALL                                               'var_dump'
          6        NEW                                              $5      'ReflectionObject'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0          
          9        INIT_METHOD_CALL                                         $5, 'getProperties'
         10        DO_FCALL                                      0  $7      
         11        FETCH_DIM_R                                      ~8      $7, 0
         12        INIT_METHOD_CALL                                         ~8, 'getType'
         13        DO_FCALL                                      0  $9      
         14        INIT_METHOD_CALL                                         $9, '__toString'
         15        DO_FCALL                                      0  $10     
         16        SEND_VAR                                                 $10
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.28 ms | 1394 KiB | 15 Q