3v4l.org

run code in 300+ 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 = 29
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 29
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
filename:       /in/EGcD5
function name:  (null)
number of ops:  31
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, ->29
          2    > > FE_FETCH_R                                               $3, !1, ->29
   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        INIT_FCALL                                               'strtr'
         14        SEND_VAR                                                 !1
         15        SEND_VAL                                                 <array>
         16        DO_ICALL                                         $8      
         17        ASSIGN                                                   !1, $8
   23    18        INIT_FCALL                                               'parse_str'
         19        SEND_VAR                                                 !1
         20        FETCH_W                      global              $10     '_GET'
         21        SEND_REF                                                 $10
         22        DO_ICALL                                                 
   24    23        INIT_FCALL                                               'var_export'
         24        FETCH_R                      global              ~12     '_GET'
         25        SEND_VAL                                                 ~12
         26        DO_ICALL                                                 
   25    27        ECHO                                                     '%0A'
   14    28      > JMP                                                      ->2
         29    >   FE_FREE                                                  $3
   26    30      > 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}
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.0.0


preferences:
156.8 ms | 1013 KiB | 20 Q