3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo { private ?\Exception $e; } $ref = new \ReflectionClass(\Foo::class); var_dump($ref->getProperty('e')->getType()->__toString());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CmTA1
function name:  (null)
number of ops:  15
compiled vars:  !0 = $ref
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   NEW                                                  $1      'ReflectionClass'
          1        SEND_VAL_EX                                                  'Foo'
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !0, $1
   11     4        INIT_FCALL                                                   'var_dump'
          5        INIT_METHOD_CALL                                             !0, 'getProperty'
          6        SEND_VAL_EX                                                  'e'
          7        DO_FCALL                                          0  $4      
          8        INIT_METHOD_CALL                                             $4, 'getType'
          9        DO_FCALL                                          0  $5      
         10        INIT_METHOD_CALL                                             $5, '__toString'
         11        DO_FCALL                                          0  $6      
         12        SEND_VAR                                                     $6
         13        DO_ICALL                                                     
         14      > RETURN                                                       1

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
233.12 ms | 3346 KiB | 14 Q