3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Service { } #[Attribute] class Inject{} class InjectAttributePresenter { #[Inject] public Service $service; } $reflector = new ReflectionProperty(InjectAttributePresenter::class, 'service'); var_dump($reflector->getAttributes(Inject::class));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3HF1T
function name:  (null)
number of ops:  12
compiled vars:  !0 = $reflector
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   17     0  E >   NEW                                                  $1      'ReflectionProperty'
          1        SEND_VAL_EX                                                  'InjectAttributePresenter'
          2        SEND_VAL_EX                                                  'service'
          3        DO_FCALL                                          0          
          4        ASSIGN                                                       !0, $1
   18     5        INIT_FCALL                                                   'var_dump'
          6        INIT_METHOD_CALL                                             !0, 'getAttributes'
          7        SEND_VAL_EX                                                  'Inject'
          8        DO_FCALL                                          0  $4      
          9        SEND_VAR                                                     $4
         10        DO_ICALL                                                     
         11      > RETURN                                                       1

Class Service: [no user functions]
Class Inject: [no user functions]
Class InjectAttributePresenter: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
156.5 ms | 1717 KiB | 14 Q