3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace N; class C { static function f($f) { $rf = new \ReflectionFunction($f); $rf->getAttributes()[0]->getArguments(); } } $f = eval(' return #[A(D::U)] function () {}; '); C::f($f);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qt4Z5
function name:  (null)
number of ops:  6
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INCLUDE_OR_EVAL                                  $1      '%0A++++return%0A++++++%23%5BA%28D%3A%3AU%29%5D%0A++++++function+%28%29+%7B%7D%3B%0A', EVAL
          1        ASSIGN                                                   !0, $1
   17     2        INIT_STATIC_METHOD_CALL                                  'N%5CC', 'f'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class N\C:
Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qt4Z5
function name:  f
number of ops:  11
compiled vars:  !0 = $f, !1 = $rf
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        NEW                                              $2      'ReflectionFunction'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $2
    8     5        INIT_METHOD_CALL                                         !1, 'getAttributes'
          6        DO_FCALL                                      0  $5      
          7        FETCH_DIM_R                                      ~6      $5, 0
          8        INIT_METHOD_CALL                                         ~6, 'getArguments'
          9        DO_FCALL                                      0          
    9    10      > RETURN                                                   null

End of function f

End of class N\C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.14 ms | 938 KiB | 14 Q