3v4l.org

run code in 500+ PHP versions simultaneously
<?php use foo\bar; #[bar] function foo() { } print (new ReflectionFunction('foo'))->getAttributes()[0]->getName();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sK4If
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   NEW                                                  $0      'ReflectionFunction'
          1        SEND_VAL_EX                                                  'foo'
          2        DO_FCALL                                          0          
          3        INIT_METHOD_CALL                                             $0, 'getAttributes'
          4        DO_FCALL                                          0  $2      
          5        FETCH_DIM_R                                          ~3      $2, 0
          6        INIT_METHOD_CALL                                             ~3, 'getName'
          7        DO_FCALL                                          0  $4      
          8        ECHO                                                         $4
          9      > RETURN                                                       1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sK4If
function name:  foo
number of ops:  1
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E > > RETURN                                                       null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
162.5 ms | 1573 KiB | 13 Q