3v4l.org

run code in 500+ PHP versions simultaneously
<?php enum TestEnum: string { /** Description about Case. */ case ABC = 'abc'; case XYZ = 'xyz'; /** @var string */ public const QWERTY = 'qwerty'; } $reflectionClass = new ReflectionClass(TestEnum::class); var_dump($reflectionClass->getProperties()[0]->getDocComment()); var_dump($reflectionClass->getProperties()[1]->getDocComment()); var_dump($reflectionClass->getReflectionConstants()[0]->getDocComment()); var_dump($reflectionClass->getReflectionConstants()[1]->getDocComment()); var_dump($reflectionClass->getReflectionConstants()[2]->getDocComment());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s1Lru
function name:  (null)
number of ops:  46
compiled vars:  !0 = $reflectionClass
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                                'testenum'
   13     1        NEW                                                  $1      'ReflectionClass'
          2        SEND_VAL_EX                                                  'TestEnum'
          3        DO_FCALL                                          0          
          4        ASSIGN                                                       !0, $1
   15     5        INIT_FCALL                                                   'var_dump'
          6        INIT_METHOD_CALL                                             !0, 'getProperties'
          7        DO_FCALL                                          0  $4      
          8        FETCH_DIM_R                                          ~5      $4, 0
          9        INIT_METHOD_CALL                                             ~5, 'getDocComment'
         10        DO_FCALL                                          0  $6      
         11        SEND_VAR                                                     $6
         12        DO_ICALL                                                     
   16    13        INIT_FCALL                                                   'var_dump'
         14        INIT_METHOD_CALL                                             !0, 'getProperties'
         15        DO_FCALL                                          0  $8      
         16        FETCH_DIM_R                                          ~9      $8, 1
         17        INIT_METHOD_CALL                                             ~9, 'getDocComment'
         18        DO_FCALL                                          0  $10     
         19        SEND_VAR                                                     $10
         20        DO_ICALL                                                     
   18    21        INIT_FCALL                                                   'var_dump'
         22        INIT_METHOD_CALL                                             !0, 'getReflectionConstants'
         23        DO_FCALL                                          0  $12     
         24        FETCH_DIM_R                                          ~13     $12, 0
         25        INIT_METHOD_CALL                                             ~13, 'getDocComment'
         26        DO_FCALL                                          0  $14     
         27        SEND_VAR                                                     $14
         28        DO_ICALL                                                     
   19    29        INIT_FCALL                                                   'var_dump'
         30        INIT_METHOD_CALL                                             !0, 'getReflectionConstants'
         31        DO_FCALL                                          0  $16     
         32        FETCH_DIM_R                                          ~17     $16, 1
         33        INIT_METHOD_CALL                                             ~17, 'getDocComment'
         34        DO_FCALL                                          0  $18     
         35        SEND_VAR                                                     $18
         36        DO_ICALL                                                     
   20    37        INIT_FCALL                                                   'var_dump'
         38        INIT_METHOD_CALL                                             !0, 'getReflectionConstants'
         39        DO_FCALL                                          0  $20     
         40        FETCH_DIM_R                                          ~21     $20, 2
         41        INIT_METHOD_CALL                                             ~21, 'getDocComment'
         42        DO_FCALL                                          0  $22     
         43        SEND_VAR                                                     $22
         44        DO_ICALL                                                     
         45      > RETURN                                                       1

Class TestEnum: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
126.2 ms | 482 KiB | 8 Q