3v4l.org

run code in 300+ PHP versions simultaneously
<?php #[A] enum B { #[C] case A; } $reflection = new ReflectionObject(B::A); $attributes = $reflection->getAttributes(); print $attributes[0];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VO82i
function name:  (null)
number of ops:  12
compiled vars:  !0 = $reflection, !1 = $attributes
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   DECLARE_CLASS                                            'b'
   10     1        NEW                                              $2      'ReflectionObject'
          2        FETCH_CLASS_CONSTANT                             ~3      'B', 'A'
          3        SEND_VAL_EX                                              ~3
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
   12     6        INIT_METHOD_CALL                                         !0, 'getAttributes'
          7        DO_FCALL                                      0  $6      
          8        ASSIGN                                                   !1, $6
   13     9        FETCH_DIM_R                                      ~8      !1, 0
         10        ECHO                                                     ~8
         11      > RETURN                                                   1

Class B: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.85 ms | 1000 KiB | 13 Q