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(get_class($param[0])); var_dump(get_class_methods($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/7CIMQ
function name:  (null)
number of ops:  30
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        FETCH_DIM_R                                      ~9      !1, 0
         13        GET_CLASS                                        ~10     ~9
         14        SEND_VAL                                                 ~10
         15        DO_ICALL                                                 
   10    16        INIT_FCALL                                               'var_dump'
         17        INIT_FCALL                                               'get_class_methods'
         18        FETCH_DIM_R                                      ~12     !1, 0
         19        SEND_VAL                                                 ~12
         20        DO_ICALL                                         $13     
         21        SEND_VAR                                                 $13
         22        DO_ICALL                                                 
   11    23        INIT_FCALL                                               'var_dump'
         24        FETCH_DIM_R                                      ~15     !1, 0
         25        INIT_METHOD_CALL                                         ~15, 'getTypeName'
         26        DO_FCALL                                      0  $16     
         27        SEND_VAR                                                 $16
         28        DO_ICALL                                                 
         29      > RETURN                                                   1

Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7CIMQ
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:
145.37 ms | 1396 KiB | 17 Q