3v4l.org

run code in 300+ PHP versions simultaneously
<?php $target = ''; $paramsToStrip = array('foo', 'bar'); $_GET = array('foo' => 'mööü', 'foooo' => 'sds'); if (!empty($_GET)) { $targetParams = array_diff_key($_GET, array_flip($paramsToStrip)); if (!empty($targetParams)) { $target = '?' . http_build_query($targetParams); } } var_dump($target);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 24
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 24
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
Branch analysis from position: 24
filename:       /in/IuvB7
function name:  (null)
number of ops:  28
compiled vars:  !0 = $target, !1 = $paramsToStrip, !2 = $targetParams
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, ''
    4     1        ASSIGN                                                   !1, <array>
    5     2        FETCH_W                      global              $5      '_GET'
          3        ASSIGN                                                   $5, <array>
    8     4        ISSET_ISEMPTY_VAR                             3  ~7      '_GET'
          5        BOOL_NOT                                         ~8      ~7
          6      > JMPZ                                                     ~8, ->24
    9     7    >   INIT_FCALL                                               'array_diff_key'
          8        FETCH_R                      global              ~9      '_GET'
          9        SEND_VAL                                                 ~9
         10        INIT_FCALL                                               'array_flip'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $10     
         13        SEND_VAR                                                 $10
         14        DO_ICALL                                         $11     
         15        ASSIGN                                                   !2, $11
   10    16        ISSET_ISEMPTY_CV                                 ~13     !2
         17        BOOL_NOT                                         ~14     ~13
         18      > JMPZ                                                     ~14, ->24
   11    19    >   INIT_FCALL                                               'http_build_query'
         20        SEND_VAR                                                 !2
         21        DO_ICALL                                         $15     
         22        CONCAT                                           ~16     '%3F', $15
         23        ASSIGN                                                   !0, ~16
   15    24    >   INIT_FCALL                                               'var_dump'
         25        SEND_VAR                                                 !0
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.81 ms | 1387 KiB | 21 Q