3v4l.org

run code in 300+ PHP versions simultaneously
<?php use Other\Hierarchy\TheOtherNamespace; $a = function(\Some\Random\NS $b) { }; $b = function(TheOtherNamespace $c) { }; $handlers = [$a, $b]; foreach ($handlers as $handler) { $r = new ReflectionFunction($handler); $p = $r->getParameters(); var_dump($p[0]->getClass()); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 23
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 23
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/Qav79
function name:  (null)
number of ops:  25
compiled vars:  !0 = $a, !1 = $b, !2 = $handlers, !3 = $handler, !4 = $r, !5 = $p
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FQav79%3A5%240'
          1        ASSIGN                                                   !0, ~6
    9     2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FQav79%3A9%241'
          3        ASSIGN                                                   !1, ~8
   14     4        INIT_ARRAY                                       ~10     !0
          5        ADD_ARRAY_ELEMENT                                ~10     !1
          6        ASSIGN                                                   !2, ~10
   15     7      > FE_RESET_R                                       $12     !2, ->23
          8    > > FE_FETCH_R                                               $12, !3, ->23
   17     9    >   NEW                                              $13     'ReflectionFunction'
         10        SEND_VAR_EX                                              !3
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !4, $13
   18    13        INIT_METHOD_CALL                                         !4, 'getParameters'
         14        DO_FCALL                                      0  $16     
         15        ASSIGN                                                   !5, $16
   19    16        INIT_FCALL                                               'var_dump'
         17        FETCH_DIM_R                                      ~18     !5, 0
         18        INIT_METHOD_CALL                                         ~18, 'getClass'
         19        DO_FCALL                                      0  $19     
         20        SEND_VAR                                                 $19
         21        DO_ICALL                                                 
   15    22      > JMP                                                      ->8
         23    >   FE_FREE                                                  $12
   20    24      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FQav79%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Qav79
function name:  {closure}
number of ops:  2
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FQav79%3A5%240

Function %00%7Bclosure%7D%2Fin%2FQav79%3A9%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Qav79
function name:  {closure}
number of ops:  2
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   11     1      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FQav79%3A9%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.61 ms | 1400 KiB | 15 Q