3v4l.org

run code in 300+ PHP versions simultaneously
<?php function create_reflection($function){ if (is_array($function)) { return new \ReflectionMethod($function[0], $function[1]); } if (is_object($function) && !$function instanceof \Closure) { return new \ReflectionMethod($function, '__invoke'); } return new \ReflectionFunction($function);} $r = create_reflection(array('Exception', '__construct'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JWVnW
function name:  (null)
number of ops:  5
compiled vars:  !0 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'create_reflection'
          1        SEND_VAL                                                 <array>
          2        DO_FCALL                                      0  $1      
          3        ASSIGN                                                   !0, $1
          4      > RETURN                                                   1

Function create_reflection:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 12
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 46) Position 1 = 14, Position 2 = 17
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 23
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/JWVnW
function name:  create_reflection
number of ops:  28
compiled vars:  !0 = $function
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        TYPE_CHECK                                  128          !0
          2      > JMPZ                                                     ~1, ->12
          3    >   NEW                                              $2      'ReflectionMethod'
          4        CHECK_FUNC_ARG                                           
          5        FETCH_DIM_FUNC_ARG                               $3      !0, 0
          6        SEND_FUNC_ARG                                            $3
          7        CHECK_FUNC_ARG                                           
          8        FETCH_DIM_FUNC_ARG                               $4      !0, 1
          9        SEND_FUNC_ARG                                            $4
         10        DO_FCALL                                      0          
         11      > RETURN                                                   $2
         12    >   TYPE_CHECK                                  256  ~6      !0
         13      > JMPZ_EX                                          ~6      ~6, ->17
         14    >   INSTANCEOF                                       ~7      !0, 'Closure'
         15        BOOL_NOT                                         ~8      ~7
         16        BOOL                                             ~6      ~8
         17    > > JMPZ                                                     ~6, ->23
         18    >   NEW                                              $9      'ReflectionMethod'
         19        SEND_VAR_EX                                              !0
         20        SEND_VAL_EX                                              '__invoke'
         21        DO_FCALL                                      0          
         22      > RETURN                                                   $9
         23    >   NEW                                              $11     'ReflectionFunction'
         24        SEND_VAR_EX                                              !0
         25        DO_FCALL                                      0          
         26      > RETURN                                                   $11
         27*     > RETURN                                                   null

End of function create_reflection

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.37 ms | 1398 KiB | 14 Q