3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test(callable $a) {} $f = new ReflectionFunction('test'); $p = $f->getParameters(); var_dump($p[0]->getClass());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BiEF6
function name:  (null)
number of ops:  14
compiled vars:  !0 = $f, !1 = $p
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $2      'ReflectionFunction'
          1        SEND_VAL_EX                                              'test'
          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        INIT_METHOD_CALL                                         ~7, 'getClass'
         10        DO_FCALL                                      0  $8      
         11        SEND_VAR                                                 $8
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

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

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.74 ms | 1395 KiB | 15 Q