3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f(string $f){} $f = new ReflectionFunction('f'); $param = $f->getParameters(); var_dump($param[0]); var_dump(class_name($param[0])); var_dump($param[0]->getTypeName());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pGtR9
function name:  (null)
number of ops:  26
compiled vars:  !0 = $f, !1 = $param
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $2      'ReflectionFunction'
          1        SEND_VAL_EX                                              'f'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    6     4        INIT_METHOD_CALL                                         !0, 'getParameters'
          5        DO_FCALL                                      0  $5      
          6        ASSIGN                                                   !1, $5
    8     7        INIT_FCALL                                               'var_dump'
          8        FETCH_DIM_R                                      ~7      !1, 0
          9        SEND_VAL                                                 ~7
         10        DO_ICALL                                                 
    9    11        INIT_FCALL                                               'var_dump'
         12        INIT_FCALL_BY_NAME                                       'class_name'
         13        CHECK_FUNC_ARG                                           
         14        FETCH_DIM_FUNC_ARG                               $9      !1, 0
         15        SEND_FUNC_ARG                                            $9
         16        DO_FCALL                                      0  $10     
         17        SEND_VAR                                                 $10
         18        DO_ICALL                                                 
   10    19        INIT_FCALL                                               'var_dump'
         20        FETCH_DIM_R                                      ~12     !1, 0
         21        INIT_METHOD_CALL                                         ~12, 'getTypeName'
         22        DO_FCALL                                      0  $13     
         23        SEND_VAR                                                 $13
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

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

End of function f

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.99 ms | 1396 KiB | 15 Q