3v4l.org

run code in 300+ PHP versions simultaneously
<?php $query = @$_SERVER['QUERY_STRING']; $basicurl = 'ABC://'; $separator = (parse_url($basicurl, PHP_URL_QUERY) == NULL) ? '?' : '&'; $finalurl .= $separator . $query; header('Location: '.$finalurl);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rlTAA
function name:  (null)
number of ops:  23
compiled vars:  !0 = $query, !1 = $basicurl, !2 = $separator, !3 = $finalurl
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   BEGIN_SILENCE                                    ~4      
          1        FETCH_R                      global              ~5      '_SERVER'
          2        FETCH_DIM_R                                      ~6      ~5, 'QUERY_STRING'
          3        END_SILENCE                                              ~4
          4        ASSIGN                                                   !0, ~6
    5     5        ASSIGN                                                   !1, 'ABC%3A%2F%2F'
    7     6        INIT_FCALL                                               'parse_url'
          7        SEND_VAR                                                 !1
          8        SEND_VAL                                                 6
          9        DO_ICALL                                         $9      
         10        IS_EQUAL                                                 $9, null
         11      > JMPZ                                                     ~10, ->14
         12    >   QM_ASSIGN                                        ~11     '%3F'
         13      > JMP                                                      ->15
         14    >   QM_ASSIGN                                        ~11     '%26'
         15    >   ASSIGN                                                   !2, ~11
    8    16        CONCAT                                           ~13     !2, !0
         17        ASSIGN_OP                                     8          !3, ~13
   10    18        INIT_FCALL                                               'header'
         19        CONCAT                                           ~15     'Location%3A+', !3
         20        SEND_VAL                                                 ~15
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.89 ms | 1399 KiB | 17 Q