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 'http://' .$_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/bo1Jb
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/bo1Jb
function name:  c_url
number of ops:  18
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        CONCAT                                           ~8      'http%3A%2F%2F', ~7
         11        FETCH_R                      global              ~9      '_SERVER'
         12        FETCH_DIM_R                                      ~10     ~9, 'SCRIPT_NAME'
         13        CONCAT                                           ~11     ~8, ~10
         14        CONCAT                                           ~12     ~11, '%3F'
         15        CONCAT                                           ~13     ~12, !1
         16      > RETURN                                                   ~13
   19    17*     > RETURN                                                   null

End of function c_url

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.89 ms | 1399 KiB | 16 Q