3v4l.org

run code in 300+ PHP versions simultaneously
<?php function userLanding(string $group, array $array, string $name, string $landing) { if (! (isset($array[$group]) && is_array($array[$group]))) { throw new exception('$array[$group] must be an array'); } foreach ($array[$group] as $user) { if ($name === $user) { redirectTo($landing); exit; } } logUnauthorizedUser($name); exit(1); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DNbDe
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E > > RETURN                                                   1

Function userlanding:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 77) Position 1 = 17, Position 2 = 25
Branch analysis from position: 17
2 jumps found. (Code = 78) Position 1 = 18, Position 2 = 25
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 24
Branch analysis from position: 20
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 25
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 25
Branch analysis from position: 9
filename:       /in/DNbDe
function name:  userLanding
number of ops:  31
compiled vars:  !0 = $group, !1 = $array, !2 = $name, !3 = $landing, !4 = $user
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
    4     4        ISSET_ISEMPTY_DIM_OBJ                         0  ~5      !1, !0
          5      > JMPZ_EX                                          ~5      ~5, ->9
          6    >   FETCH_DIM_R                                      ~6      !1, !0
          7        TYPE_CHECK                                  128  ~7      ~6
          8        BOOL                                             ~5      ~7
          9    >   BOOL_NOT                                         ~8      ~5
         10      > JMPZ                                                     ~8, ->15
    5    11    >   NEW                                              $9      'exception'
         12        SEND_VAL_EX                                              '%24array%5B%24group%5D+must+be+an+array'
         13        DO_FCALL                                      0          
         14      > THROW                                         0          $9
    8    15    >   FETCH_DIM_R                                      ~11     !1, !0
         16      > FE_RESET_R                                       $12     ~11, ->25
         17    > > FE_FETCH_R                                               $12, !4, ->25
    9    18    >   IS_IDENTICAL                                             !2, !4
         19      > JMPZ                                                     ~13, ->24
   10    20    >   INIT_FCALL_BY_NAME                                       'redirectTo'
         21        SEND_VAR_EX                                              !3
         22        DO_FCALL                                      0          
   11    23      > EXIT                                                     
    8    24    > > JMP                                                      ->17
         25    >   FE_FREE                                                  $12
   14    26        INIT_FCALL_BY_NAME                                       'logUnauthorizedUser'
         27        SEND_VAR_EX                                              !2
         28        DO_FCALL                                      0          
   15    29      > EXIT                                                     1
   16    30*     > RETURN                                                   null

End of function userlanding

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.71 ms | 1403 KiB | 13 Q