3v4l.org

run code in 300+ PHP versions simultaneously
<?php $removeQueryValues = array('sid'); $link = 'http://www.triff-chemnitz.de/fuu/baar?sid=12rhdgsvgz3gfusgvc'; $url = parse_url($link); parse_str($url['query'], $query); foreach ($query as $key => $value) { if (in_array($key, $removeQueryValues)) { unset($query[$key]); } } $url['query'] = http_build_query($query); echo http_build_url($url);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 21
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 21
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 20
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 20
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/ve713
function name:  (null)
number of ops:  32
compiled vars:  !0 = $removeQueryValues, !1 = $link, !2 = $url, !3 = $query, !4 = $value, !5 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, 'http%3A%2F%2Fwww.triff-chemnitz.de%2Ffuu%2Fbaar%3Fsid%3D12rhdgsvgz3gfusgvc'
    6     2        INIT_FCALL                                               'parse_url'
          3        SEND_VAR                                                 !1
          4        DO_ICALL                                         $8      
          5        ASSIGN                                                   !2, $8
    7     6        INIT_FCALL                                               'parse_str'
          7        FETCH_DIM_R                                      ~10     !2, 'query'
          8        SEND_VAL                                                 ~10
          9        SEND_REF                                                 !3
         10        DO_ICALL                                                 
    9    11      > FE_RESET_R                                       $12     !3, ->21
         12    > > FE_FETCH_R                                       ~13     $12, !4, ->21
         13    >   ASSIGN                                                   !5, ~13
   10    14        INIT_FCALL                                               'in_array'
         15        SEND_VAR                                                 !5
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $15     
         18      > JMPZ                                                     $15, ->20
   11    19    >   UNSET_DIM                                                !3, !5
    9    20    > > JMP                                                      ->12
         21    >   FE_FREE                                                  $12
   15    22        INIT_FCALL                                               'http_build_query'
         23        SEND_VAR                                                 !3
         24        DO_ICALL                                         $17     
         25        ASSIGN_DIM                                               !2, 'query'
         26        OP_DATA                                                  $17
   17    27        INIT_FCALL_BY_NAME                                       'http_build_url'
         28        SEND_VAR_EX                                              !2
         29        DO_FCALL                                      0  $18     
         30        ECHO                                                     $18
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.05 ms | 1396 KiB | 21 Q