3v4l.org

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

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

End of function load

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.05 ms | 1395 KiB | 15 Q