3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_GET = [ 'a' => 1, 'b' => 2, 'c' => 3, ]; $_SERVER = [ 'HTTP_HOST' => 'http://www.example.com', 'SCRIPT_NAME' => '/test.php', ]; function c_url($key) { unset($_GET[$key]); $queryString = http_build_query($_GET); return $_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'].'?'.$queryString; } echo c_url('b') . '&b=5';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PkNtH
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   FETCH_W                      global              $0      '_GET'
          1        ASSIGN                                                   $0, <array>
    9     2        FETCH_W                      global              $2      '_SERVER'
          3        ASSIGN                                                   $2, <array>
   21     4        INIT_FCALL                                               'c_url'
          5        SEND_VAL                                                 'b'
          6        DO_FCALL                                      0  $4      
          7        CONCAT                                           ~5      $4, '%26b%3D5'
          8        ECHO                                                     ~5
          9      > RETURN                                                   1

Function c_url:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PkNtH
function name:  c_url
number of ops:  17
compiled vars:  !0 = $key, !1 = $queryString
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   15     1        FETCH_UNSET                                      $2      '_GET'
          2        UNSET_DIM                                                $2, !0
   16     3        INIT_FCALL                                               'http_build_query'
          4        FETCH_R                      global              ~3      '_GET'
          5        SEND_VAL                                                 ~3
          6        DO_ICALL                                         $4      
          7        ASSIGN                                                   !1, $4
   18     8        FETCH_R                      global              ~6      '_SERVER'
          9        FETCH_DIM_R                                      ~7      ~6, 'HTTP_HOST'
         10        FETCH_R                      global              ~8      '_SERVER'
         11        FETCH_DIM_R                                      ~9      ~8, 'SCRIPT_NAME'
         12        CONCAT                                           ~10     ~7, ~9
         13        CONCAT                                           ~11     ~10, '%3F'
         14        CONCAT                                           ~12     ~11, !1
         15      > RETURN                                                   ~12
   19    16*     > RETURN                                                   null

End of function c_url

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.73 ms | 1389 KiB | 16 Q