3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { function foobar(int $int, string $string, array $array, callable $callable, Test $object, $noType) { } } $r = new ReflectionMethod('Test', 'foobar'); foreach ($r->getParameters() as $param) { var_dump(array($param->name, $param->hasType(), $param->getType())); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 21
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 21
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/4hj3X
function name:  (null)
number of ops:  23
compiled vars:  !0 = $r, !1 = $param
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $2      'ReflectionMethod'
          1        SEND_VAL_EX                                              'Test'
          2        SEND_VAL_EX                                              'foobar'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $2
   11     5        INIT_METHOD_CALL                                         !0, 'getParameters'
          6        DO_FCALL                                      0  $5      
          7      > FE_RESET_R                                       $6      $5, ->21
          8    > > FE_FETCH_R                                               $6, !1, ->21
   12     9    >   INIT_FCALL                                               'var_dump'
         10        FETCH_OBJ_R                                      ~7      !1, 'name'
         11        INIT_ARRAY                                       ~8      ~7
         12        INIT_METHOD_CALL                                         !1, 'hasType'
         13        DO_FCALL                                      0  $9      
         14        ADD_ARRAY_ELEMENT                                ~8      $9
         15        INIT_METHOD_CALL                                         !1, 'getType'
         16        DO_FCALL                                      0  $10     
         17        ADD_ARRAY_ELEMENT                                ~8      $10
         18        SEND_VAL                                                 ~8
         19        DO_ICALL                                                 
   11    20      > JMP                                                      ->8
         21    >   FE_FREE                                                  $6
   13    22      > RETURN                                                   1

Class Test:
Function foobar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4hj3X
function name:  foobar
number of ops:  7
compiled vars:  !0 = $int, !1 = $string, !2 = $array, !3 = $callable, !4 = $object, !5 = $noType
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
          4        RECV                                             !4      
          5        RECV                                             !5      
    6     6      > RETURN                                                   null

End of function foobar

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.21 ms | 1437 KiB | 14 Q