3v4l.org

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

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

End of function method

End of class Some.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.2 ms | 1395 KiB | 15 Q