3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_GET = [ 'q' => 'Modules/ShowDocument.aspx', 'documentlD' => '278', ]; // The following query strings should be corrected for case sensitivity or url // redirects won't match properly. $substitutions = [ 'documentid' => 'documentID', 'imageid' => 'imageID', ]; // if (!empty(array_intersect(array_map('strtolower', array_keys($_GET)), array_keys($substitutions)))) { foreach ($_GET as $param_name => $value) { $param_lc = strtolower($param_name); if (in_array($param_lc, array_keys($substitutions)) && $param_name !== $substitutions[$param_lc]) { $_GET[$substitutions[$param_lc]] = $value; unset($_GET[$param_name]); } } // } var_dump($_GET);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 30
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 30
Branch analysis from position: 6
2 jumps found. (Code = 46) Position 1 = 19, Position 2 = 22
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 29
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 29
Branch analysis from position: 22
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
filename:       /in/HI9dK
function name:  (null)
number of ops:  36
compiled vars:  !0 = $substitutions, !1 = $value, !2 = $param_name, !3 = $param_lc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   FETCH_W                      global              $4      '_GET'
          1        ASSIGN                                                   $4, <array>
   10     2        ASSIGN                                                   !0, <array>
   16     3        FETCH_R                      global              ~7      '_GET'
          4      > FE_RESET_R                                       $8      ~7, ->30
          5    > > FE_FETCH_R                                       ~9      $8, !1, ->30
          6    >   ASSIGN                                                   !2, ~9
   17     7        INIT_FCALL                                               'strtolower'
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                         $11     
         10        ASSIGN                                                   !3, $11
   18    11        INIT_FCALL                                               'in_array'
         12        SEND_VAR                                                 !3
         13        INIT_FCALL                                               'array_keys'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                         $13     
         16        SEND_VAR                                                 $13
         17        DO_ICALL                                         $14     
         18      > JMPZ_EX                                          ~15     $14, ->22
         19    >   FETCH_DIM_R                                      ~16     !0, !3
         20        IS_NOT_IDENTICAL                                 ~17     !2, ~16
         21        BOOL                                             ~15     ~17
         22    > > JMPZ                                                     ~15, ->29
   19    23    >   FETCH_DIM_R                                      ~19     !0, !3
         24        FETCH_W                      global              $18     '_GET'
         25        ASSIGN_DIM                                               $18, ~19
         26        OP_DATA                                                  !1
   20    27        FETCH_UNSET                                      $21     '_GET'
         28        UNSET_DIM                                                $21, !2
   16    29    > > JMP                                                      ->5
         30    >   FE_FREE                                                  $8
   25    31        INIT_FCALL                                               'var_dump'
         32        FETCH_R                      global              ~22     '_GET'
         33        SEND_VAL                                                 ~22
         34        DO_ICALL                                                 
         35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.33 ms | 1396 KiB | 21 Q