3v4l.org

run code in 500+ PHP versions simultaneously
<?php namespace Somebody\Something; #[ Foo( Foo::class ) ] class Whatever {} $reflector = new \ReflectionClass(Whatever::class); $attributes = $reflector->getAttributes(); var_dump($attributes[0]->getName(), $attributes[0]->getArguments());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bgNa2
function name:  (null)
number of ops:  18
compiled vars:  !0 = $reflector, !1 = $attributes
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   NEW                                                  $2      'ReflectionClass'
          1        SEND_VAL_EX                                                  'Somebody%5CSomething%5CWhatever'
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !0, $2
    8     4        INIT_METHOD_CALL                                             !0, 'getAttributes'
          5        DO_FCALL                                          0  $5      
          6        ASSIGN                                                       !1, $5
    9     7        INIT_NS_FCALL_BY_NAME                                        'Somebody%5CSomething%5Cvar_dump'
          8        FETCH_DIM_R                                          ~7      !1, 0
          9        INIT_METHOD_CALL                                             ~7, 'getName'
         10        DO_FCALL                                          0  $8      
         11        SEND_VAR_NO_REF_EX                                           $8
         12        FETCH_DIM_R                                          ~9      !1, 0
         13        INIT_METHOD_CALL                                             ~9, 'getArguments'
         14        DO_FCALL                                          0  $10     
         15        SEND_VAR_NO_REF_EX                                           $10
         16        DO_FCALL                                          0          
         17      > RETURN                                                       1

Class Somebody\Something\Whatever: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
176.18 ms | 2017 KiB | 14 Q