3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = 'http://foo.bar?asd=qwe?bans=asf'; $urlComponents = parse_url($url); var_dump($urlComponents);exit; $urlComponents['query'] = array_merge($$urlComponents['query'], http_build_query($parameters)); return http_build_url($$urlComponents); var_dump($foo);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/C629Q
function name:  (null)
number of ops:  30
compiled vars:  !0 = $url, !1 = $urlComponents, !2 = $parameters, !3 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Ffoo.bar%3Fasd%3Dqwe%3Fbans%3Dasf'
    5     1        INIT_FCALL                                               'parse_url'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
    6     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
          8      > EXIT                                                     
    7     9*       INIT_FCALL                                               'array_merge'
         10*       FETCH_R                      local               ~9      !1
         11*       FETCH_DIM_R                                      ~10     ~9, 'query'
         12*       SEND_VAL                                                 ~10
         13*       INIT_FCALL                                               'http_build_query'
         14*       SEND_VAR                                                 !2
         15*       DO_ICALL                                         $11     
         16*       SEND_VAR                                                 $11
         17*       DO_ICALL                                         $12     
         18*       ASSIGN_DIM                                               !1, 'query'
         19*       OP_DATA                                                  $12
    9    20*       INIT_FCALL_BY_NAME                                       'http_build_url'
         21*       CHECK_FUNC_ARG                                           
         22*       FETCH_FUNC_ARG               local               $13     !1
         23*       SEND_FUNC_ARG                                            $13
         24*       DO_FCALL                                      0  $14     
         25*       RETURN                                                   $14
   11    26*       INIT_FCALL                                               'var_dump'
         27*       SEND_VAR                                                 !3
         28*       DO_ICALL                                                 
         29*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.01 ms | 1395 KiB | 21 Q