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'); foreach ($method->getParameters() as $param) { var_dump($param['name']); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 17
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 17
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/V0gj9
function name:  (null)
number of ops:  19
compiled vars:  !0 = $reflection, !1 = $method, !2 = $param
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $3      'ReflectionClass'
          1        SEND_VAL_EX                                              'Foo'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    8     4        INIT_METHOD_CALL                                         !0, 'getMethod'
          5        SEND_VAL_EX                                              'load'
          6        DO_FCALL                                      0  $6      
          7        ASSIGN                                                   !1, $6
   10     8        INIT_METHOD_CALL                                         !1, 'getParameters'
          9        DO_FCALL                                      0  $8      
         10      > FE_RESET_R                                       $9      $8, ->17
         11    > > FE_FETCH_R                                               $9, !2, ->17
   11    12    >   INIT_FCALL                                               'var_dump'
         13        FETCH_DIM_R                                      ~10     !2, 'name'
         14        SEND_VAL                                                 ~10
         15        DO_ICALL                                                 
   10    16      > JMP                                                      ->11
         17    >   FE_FREE                                                  $9
   12    18      > RETURN                                                   1

Class Foo:
Function load:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/V0gj9
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:
146.2 ms | 1395 KiB | 15 Q