3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Bar{} class Foo { function bar(Bar $bar) { } } $r = new ReflectionMethod(new Foo(), 'bar'); $parameters = $r->getParameters(); $parameters[0]->getType();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/N9r9t
function name:  (null)
number of ops:  14
compiled vars:  !0 = $r, !1 = $parameters
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $2      'ReflectionMethod'
          1        NEW                                              $3      'Foo'
          2        DO_FCALL                                      0          
          3        SEND_VAR_NO_REF_EX                                       $3
          4        SEND_VAL_EX                                              'bar'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $2
   14     7        INIT_METHOD_CALL                                         !0, 'getParameters'
          8        DO_FCALL                                      0  $7      
          9        ASSIGN                                                   !1, $7
   16    10        FETCH_DIM_R                                      ~9      !1, 0
         11        INIT_METHOD_CALL                                         ~9, 'getType'
         12        DO_FCALL                                      0          
         13      > RETURN                                                   1

Class Bar: [no user functions]
Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/N9r9t
function name:  bar
number of ops:  2
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
   10     1      > RETURN                                                   null

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.95 ms | 1398 KiB | 13 Q