3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = 'http://mysite.com/hello/world?look_at=me'; $query = parse_str($url); $url = 'http://mysite.com/hello/world?look_at=me&test=1'; $query = parse_url($url, PHP_URL_QUERY); var_dump($query); var_dump(http_build_query(array_merge($query)));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0LNpY
function name:  (null)
number of ops:  24
compiled vars:  !0 = $url, !1 = $query
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fmysite.com%2Fhello%2Fworld%3Flook_at%3Dme'
    3     1        INIT_FCALL                                               'parse_str'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !1, $3
    4     5        ASSIGN                                                   !0, 'http%3A%2F%2Fmysite.com%2Fhello%2Fworld%3Flook_at%3Dme%26test%3D1'
    5     6        INIT_FCALL                                               'parse_url'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 6
          9        DO_ICALL                                         $6      
         10        ASSIGN                                                   !1, $6
    6    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
    7    14        INIT_FCALL                                               'var_dump'
         15        INIT_FCALL                                               'http_build_query'
         16        INIT_FCALL                                               'array_merge'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                         $9      
         19        SEND_VAR                                                 $9
         20        DO_ICALL                                         $10     
         21        SEND_VAR                                                 $10
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.87 ms | 1395 KiB | 23 Q