3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { static function f() { $f = eval(' return #[A(self::U)] function () {}; '); $rf = new \ReflectionFunction($f); $rf->getAttributes()[0]->getArguments(); } } C::f();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P9jvs
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_STATIC_METHOD_CALL                                  'C', 'f'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Class C:
Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P9jvs
function name:  f
number of ops:  12
compiled vars:  !0 = $f, !1 = $rf
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INCLUDE_OR_EVAL                                  $2      '%0A++++++++++++return%0A++++++++++++++%23%5BA%28self%3A%3AU%29%5D%0A++++++++++++++function+%28%29+%7B%7D%3B%0A++++++++', EVAL
          1        ASSIGN                                                   !0, $2
   11     2        NEW                                              $4      'ReflectionFunction'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $4
   12     6        INIT_METHOD_CALL                                         !1, 'getAttributes'
          7        DO_FCALL                                      0  $7      
          8        FETCH_DIM_R                                      ~8      $7, 0
          9        INIT_METHOD_CALL                                         ~8, 'getArguments'
         10        DO_FCALL                                      0          
   13    11      > RETURN                                                   null

End of function f

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.96 ms | 1393 KiB | 13 Q