3v4l.org

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

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

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.76 ms | 1395 KiB | 15 Q