3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = 'http://www.example.com/login.php/?redirect=myprofile.php'; $url_components = parse_url($url); if (!empty($url_components['query'])){ parse_str($url_components['query'], $params); print_r($params); } else { echo "query doesn't exist in parse_str"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 17
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Vt3aa
function name:  (null)
number of ops:  19
compiled vars:  !0 = $url, !1 = $url_components, !2 = $params
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fwww.example.com%2Flogin.php%2F%3Fredirect%3Dmyprofile.php'
    3     1        INIT_FCALL                                               'parse_url'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
    4     5        ISSET_ISEMPTY_DIM_OBJ                         1  ~6      !1, 'query'
          6        BOOL_NOT                                         ~7      ~6
          7      > JMPZ                                                     ~7, ->17
    5     8    >   INIT_FCALL                                               'parse_str'
          9        FETCH_DIM_R                                      ~8      !1, 'query'
         10        SEND_VAL                                                 ~8
         11        SEND_REF                                                 !2
         12        DO_ICALL                                                 
    6    13        INIT_FCALL                                               'print_r'
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                                 
    4    16      > JMP                                                      ->18
    8    17    >   ECHO                                                     'query+doesn%27t+exist+in+parse_str'
    9    18    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.06 ms | 999 KiB | 16 Q