3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(parse_url('https://example.com?foo&bar')); $_GET = ['een', 'twee']; $newUrl = "http://my-new-website.com/"; $currentPage = $_SERVER['PHP_SELF']; //building the querystrging (if some GET variables where set): $queryString = "?"; $firstRun = true; foreach($_GET as $key => $value) { if(!$firstRun) { $queryString .= "&"; } $queryString .= $key."=".urlencode($value); } var_dump($queryString);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 28
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 28
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 21
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 21
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
filename:       /in/IBbtT
function name:  (null)
number of ops:  33
compiled vars:  !0 = $newUrl, !1 = $currentPage, !2 = $queryString, !3 = $firstRun, !4 = $value, !5 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'parse_url'
          2        SEND_VAL                                                 'https%3A%2F%2Fexample.com%3Ffoo%26bar'
          3        DO_ICALL                                         $6      
          4        SEND_VAR                                                 $6
          5        DO_ICALL                                                 
    5     6        FETCH_W                      global              $8      '_GET'
          7        ASSIGN                                                   $8, <array>
    7     8        ASSIGN                                                   !0, 'http%3A%2F%2Fmy-new-website.com%2F'
    8     9        FETCH_R                      global              ~11     '_SERVER'
         10        FETCH_DIM_R                                      ~12     ~11, 'PHP_SELF'
         11        ASSIGN                                                   !1, ~12
   10    12        ASSIGN                                                   !2, '%3F'
   11    13        ASSIGN                                                   !3, <true>
   12    14        FETCH_R                      global              ~16     '_GET'
         15      > FE_RESET_R                                       $17     ~16, ->28
         16    > > FE_FETCH_R                                       ~18     $17, !4, ->28
         17    >   ASSIGN                                                   !5, ~18
   13    18        BOOL_NOT                                         ~20     !3
         19      > JMPZ                                                     ~20, ->21
   14    20    >   ASSIGN_OP                                     8          !2, '%26'
   16    21    >   CONCAT                                           ~22     !5, '%3D'
         22        INIT_FCALL                                               'urlencode'
         23        SEND_VAR                                                 !4
         24        DO_ICALL                                         $23     
         25        CONCAT                                           ~24     ~22, $23
         26        ASSIGN_OP                                     8          !2, ~24
   12    27      > JMP                                                      ->16
         28    >   FE_FREE                                                  $17
   19    29        INIT_FCALL                                               'var_dump'
         30        SEND_VAR                                                 !2
         31        DO_ICALL                                                 
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.77 ms | 1396 KiB | 19 Q