3v4l.org

run code in 300+ PHP versions simultaneously
<?php #[AsCommand(description: 'description of the command', name: 'app:'.self::command.':process')] final class MyCommand { private const COMMAND = 'command'; } $r = new ReflectionClass('MyCommand'); foreach($r->getAttributes() as $attribute) { foreach($attribute->getArguments() as $arg) { var_dump($arg); } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 18
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 18
Branch analysis from position: 8
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 16
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 16
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 16
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/qTKeQ
function name:  (null)
number of ops:  20
compiled vars:  !0 = $r, !1 = $attribute, !2 = $arg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $3      'ReflectionClass'
          1        SEND_VAL_EX                                              'MyCommand'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
   10     4        INIT_METHOD_CALL                                         !0, 'getAttributes'
          5        DO_FCALL                                      0  $6      
          6      > FE_RESET_R                                       $7      $6, ->18
          7    > > FE_FETCH_R                                               $7, !1, ->18
   11     8    >   INIT_METHOD_CALL                                         !1, 'getArguments'
          9        DO_FCALL                                      0  $8      
         10      > FE_RESET_R                                       $9      $8, ->16
         11    > > FE_FETCH_R                                               $9, !2, ->16
   12    12    >   INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                                 
   11    15      > JMP                                                      ->11
         16    >   FE_FREE                                                  $9
   10    17      > JMP                                                      ->7
         18    >   FE_FREE                                                  $7
   14    19      > RETURN                                                   1

Class MyCommand: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.07 ms | 1426 KiB | 14 Q