3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = 'http://www.my.com/api.php?key1=xxx&key2=xxx'; $src = 'http://www.my.com/api.php?url='.urlencode($url); $src = parse_url( urldecode($src) ); parse_str($src['query']); echo $url,'------'; $url = 'http://www.my.com/api.php?key1=xxx&key2=xxx'; $src = 'http://www.my.com/api.php?url='.urlencode(urlencode($url)); $src = parse_url( urldecode($src) ); parse_str($src['query']); echo $url,'------';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Uh3TW
function name:  (null)
number of ops:  42
compiled vars:  !0 = $url, !1 = $src
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fwww.my.com%2Fapi.php%3Fkey1%3Dxxx%26key2%3Dxxx'
    3     1        INIT_FCALL                                               'urlencode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $3      
          4        CONCAT                                           ~4      'http%3A%2F%2Fwww.my.com%2Fapi.php%3Furl%3D', $3
          5        ASSIGN                                                   !1, ~4
    4     6        INIT_FCALL                                               'parse_url'
          7        INIT_FCALL                                               'urldecode'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $6      
         10        SEND_VAR                                                 $6
         11        DO_ICALL                                         $7      
         12        ASSIGN                                                   !1, $7
    5    13        INIT_FCALL                                               'parse_str'
         14        FETCH_DIM_R                                      ~9      !1, 'query'
         15        SEND_VAL                                                 ~9
         16        DO_ICALL                                                 
    6    17        ECHO                                                     !0
         18        ECHO                                                     '------'
    8    19        ASSIGN                                                   !0, 'http%3A%2F%2Fwww.my.com%2Fapi.php%3Fkey1%3Dxxx%26key2%3Dxxx'
    9    20        INIT_FCALL                                               'urlencode'
         21        INIT_FCALL                                               'urlencode'
         22        SEND_VAR                                                 !0
         23        DO_ICALL                                         $12     
         24        SEND_VAR                                                 $12
         25        DO_ICALL                                         $13     
         26        CONCAT                                           ~14     'http%3A%2F%2Fwww.my.com%2Fapi.php%3Furl%3D', $13
         27        ASSIGN                                                   !1, ~14
   10    28        INIT_FCALL                                               'parse_url'
         29        INIT_FCALL                                               'urldecode'
         30        SEND_VAR                                                 !1
         31        DO_ICALL                                         $16     
         32        SEND_VAR                                                 $16
         33        DO_ICALL                                         $17     
         34        ASSIGN                                                   !1, $17
   11    35        INIT_FCALL                                               'parse_str'
         36        FETCH_DIM_R                                      ~19     !1, 'query'
         37        SEND_VAL                                                 ~19
         38        DO_ICALL                                                 
   12    39        ECHO                                                     !0
         40        ECHO                                                     '------'
         41      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.19 ms | 1401 KiB | 21 Q