3v4l.org

run code in 300+ PHP versions simultaneously
<?php $credentials = array('user','pass'); $parts = parse_url('reportingpro.asherlogistics.com/flow.html?'); $parts['query'] = isset($parts['query']) ? $parts['query'] : array(); $query = array(); parse_str($parts['query'],$query); $query['j_username'] = $credentials[0]; $query['j_password'] = $credentials[1]; $parts['query'] = http_build_query($query); $uri = isset($parts['scheme']) ? "{$parts['scheme']}://":''; $uri .= isset($parts['host']) ? $parts['host']:''; $uri .= isset($parts['port']) ? ":{$parts['port']}":''; $uri .= isset($parts['path']) ? $parts['path']:''; $uri .= '?'.http_build_query($query); echo $uri;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 32, Position 2 = 37
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
2 jumps found. (Code = 43) Position 1 = 41, Position 2 = 44
Branch analysis from position: 41
1 jumps found. (Code = 42) Position 1 = 45
Branch analysis from position: 45
2 jumps found. (Code = 43) Position 1 = 48, Position 2 = 53
Branch analysis from position: 48
1 jumps found. (Code = 42) Position 1 = 54
Branch analysis from position: 54
2 jumps found. (Code = 43) Position 1 = 57, Position 2 = 60
Branch analysis from position: 57
1 jumps found. (Code = 42) Position 1 = 61
Branch analysis from position: 61
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 60
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 53
2 jumps found. (Code = 43) Position 1 = 57, Position 2 = 60
Branch analysis from position: 57
Branch analysis from position: 60
Branch analysis from position: 44
2 jumps found. (Code = 43) Position 1 = 48, Position 2 = 53
Branch analysis from position: 48
Branch analysis from position: 53
Branch analysis from position: 37
2 jumps found. (Code = 43) Position 1 = 41, Position 2 = 44
Branch analysis from position: 41
Branch analysis from position: 44
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 32, Position 2 = 37
Branch analysis from position: 32
Branch analysis from position: 37
filename:       /in/FdTY0
function name:  (null)
number of ops:  69
compiled vars:  !0 = $credentials, !1 = $parts, !2 = $query, !3 = $uri
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'parse_url'
          2        SEND_VAL                                                 'reportingpro.asherlogistics.com%2Fflow.html%3F'
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
    6     5        ISSET_ISEMPTY_DIM_OBJ                         0          !1, 'query'
          6      > JMPZ                                                     ~8, ->10
          7    >   FETCH_DIM_R                                      ~9      !1, 'query'
          8        QM_ASSIGN                                        ~10     ~9
          9      > JMP                                                      ->11
         10    >   QM_ASSIGN                                        ~10     <array>
         11    >   ASSIGN_DIM                                               !1, 'query'
         12        OP_DATA                                                  ~10
    7    13        ASSIGN                                                   !2, <array>
    8    14        INIT_FCALL                                               'parse_str'
         15        FETCH_DIM_R                                      ~12     !1, 'query'
         16        SEND_VAL                                                 ~12
         17        SEND_REF                                                 !2
         18        DO_ICALL                                                 
    9    19        FETCH_DIM_R                                      ~15     !0, 0
         20        ASSIGN_DIM                                               !2, 'j_username'
         21        OP_DATA                                                  ~15
   10    22        FETCH_DIM_R                                      ~17     !0, 1
         23        ASSIGN_DIM                                               !2, 'j_password'
         24        OP_DATA                                                  ~17
   11    25        INIT_FCALL                                               'http_build_query'
         26        SEND_VAR                                                 !2
         27        DO_ICALL                                         $19     
         28        ASSIGN_DIM                                               !1, 'query'
         29        OP_DATA                                                  $19
   12    30        ISSET_ISEMPTY_DIM_OBJ                         0          !1, 'scheme'
         31      > JMPZ                                                     ~20, ->37
         32    >   FETCH_DIM_R                                      ~21     !1, 'scheme'
         33        NOP                                                      
         34        FAST_CONCAT                                      ~22     ~21, '%3A%2F%2F'
         35        QM_ASSIGN                                        ~23     ~22
         36      > JMP                                                      ->38
         37    >   QM_ASSIGN                                        ~23     ''
         38    >   ASSIGN                                                   !3, ~23
   13    39        ISSET_ISEMPTY_DIM_OBJ                         0          !1, 'host'
         40      > JMPZ                                                     ~25, ->44
         41    >   FETCH_DIM_R                                      ~26     !1, 'host'
         42        QM_ASSIGN                                        ~27     ~26
         43      > JMP                                                      ->45
         44    >   QM_ASSIGN                                        ~27     ''
         45    >   ASSIGN_OP                                     8          !3, ~27
   14    46        ISSET_ISEMPTY_DIM_OBJ                         0          !1, 'port'
         47      > JMPZ                                                     ~29, ->53
         48    >   NOP                                                      
         49        FETCH_DIM_R                                      ~30     !1, 'port'
         50        FAST_CONCAT                                      ~31     '%3A', ~30
         51        QM_ASSIGN                                        ~32     ~31
         52      > JMP                                                      ->54
         53    >   QM_ASSIGN                                        ~32     ''
         54    >   ASSIGN_OP                                     8          !3, ~32
   15    55        ISSET_ISEMPTY_DIM_OBJ                         0          !1, 'path'
         56      > JMPZ                                                     ~34, ->60
         57    >   FETCH_DIM_R                                      ~35     !1, 'path'
         58        QM_ASSIGN                                        ~36     ~35
         59      > JMP                                                      ->61
         60    >   QM_ASSIGN                                        ~36     ''
         61    >   ASSIGN_OP                                     8          !3, ~36
   16    62        INIT_FCALL                                               'http_build_query'
         63        SEND_VAR                                                 !2
         64        DO_ICALL                                         $38     
         65        CONCAT                                           ~39     '%3F', $38
         66        ASSIGN_OP                                     8          !3, ~39
   17    67        ECHO                                                     !3
         68      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.69 ms | 1392 KiB | 19 Q