3v4l.org

run code in 500+ PHP versions simultaneously
<?php // this is hack until you can manage to resolve the encoding issue in a more professional manner // use $_SERVER['QUERY_STRING'] to extract the query string from the url $queryStrings = [ 'lat=25.79&amp%3Blon=-80.16', 'lat=41.46u0026lon%3D-82.71', 'lat%5Cu003d30.31%5Cu0026lon%5Cu003d-89.33', 'lat=28.94-89.4&lon', 'tag%5Cu003d44' ]; foreach ($queryStrings as $queryString) { // replace unicode-like substrings $queryString = preg_replace_callback('/u([\da-f]{4})/i', function ($match) { return mb_convert_encoding(pack('H*', $match[1]), 'UTF-8', 'UCS-2BE'); }, urldecode($queryString)); // courtesy of Gumbo: https://stackoverflow.com/a/2934602/2943403 $queryString = strtr($queryString, ['&amp;' => '&', '\\' => '']); parse_str($queryString, $_GET); var_export($_GET); echo "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 26
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 26
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/EGcD5
function name:  (null)
number of ops:  28
compiled vars:  !0 = $queryStrings, !1 = $queryString
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                       !0, <array>
   14     1      > FE_RESET_R                                           $3      !0, ->26
          2    > > FE_FETCH_R                                                   $3, !1, ->26
   16     3    >   INIT_FCALL                                                   'preg_replace_callback'
          4        SEND_VAL                                                     '%2Fu%28%5B%5Cda-f%5D%7B4%7D%29%2Fi'
          5        DECLARE_LAMBDA_FUNCTION                              ~4      [0]
   18     6        SEND_VAL                                                     ~4
          7        INIT_FCALL                                                   'urldecode'
          8        SEND_VAR                                                     !1
          9        DO_ICALL                                             $5      
         10        SEND_VAR                                                     $5
   16    11        DO_ICALL                                             $6      
         12        ASSIGN                                                       !1, $6
   21    13        FRAMELESS_ICALL_2                strtr               ~8      !1, <array>
         14        ASSIGN                                                       !1, ~8
   23    15        INIT_FCALL                                                   'parse_str'
         16        SEND_VAR                                                     !1
         17        FETCH_W                          global              $10     '_GET'
         18        SEND_REF                                                     $10
         19        DO_ICALL                                                     
   24    20        INIT_FCALL                                                   'var_export'
         21        FETCH_R                          global              ~12     '_GET'
         22        SEND_VAL                                                     ~12
         23        DO_ICALL                                                     
   25    24        ECHO                                                         '%0A'
   14    25      > JMP                                                          ->2
         26    >   FE_FREE                                                      $3
   26    27      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EGcD5
function name:  {closure:/in/EGcD5:16}
number of ops:  13
compiled vars:  !0 = $match
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   16     0  E >   RECV                                                 !0      
   17     1        INIT_FCALL                                                   'mb_convert_encoding'
          2        INIT_FCALL                                                   'pack'
          3        SEND_VAL                                                     'H%2A'
          4        FETCH_DIM_R                                          ~1      !0, 1
          5        SEND_VAL                                                     ~1
          6        DO_ICALL                                             $2      
          7        SEND_VAR                                                     $2
          8        SEND_VAL                                                     'UTF-8'
          9        SEND_VAL                                                     'UCS-2BE'
         10        DO_ICALL                                             $3      
         11      > RETURN                                                       $3
   18    12*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
203.89 ms | 2189 KiB | 19 Q