3v4l.org

run code in 300+ PHP versions simultaneously
<?php function qs_search($qs) { parse_str($_SERVER['QUERY_STRING'], $query_string); $query_string['search'] = basename($qs); return http_build_query($query_string); } qs_search("regular"); qs_search("Синодальный");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7MLH1
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'qs_search'
          1        SEND_VAL                                                 'regular'
          2        DO_FCALL                                      0          
    8     3        INIT_FCALL                                               'qs_search'
          4        SEND_VAL                                                 '%D0%A1%D0%B8%D0%BD%D0%BE%D0%B4%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B9'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Function qs_search:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7MLH1
function name:  qs_search
number of ops:  17
compiled vars:  !0 = $qs, !1 = $query_string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        INIT_FCALL                                               'parse_str'
          2        FETCH_R                      global              ~2      '_SERVER'
          3        FETCH_DIM_R                                      ~3      ~2, 'QUERY_STRING'
          4        SEND_VAL                                                 ~3
          5        SEND_REF                                                 !1
          6        DO_ICALL                                                 
    4     7        INIT_FCALL                                               'basename'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $6      
         10        ASSIGN_DIM                                               !1, 'search'
         11        OP_DATA                                                  $6
    5    12        INIT_FCALL                                               'http_build_query'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $7      
         15      > RETURN                                                   $7
    6    16*     > RETURN                                                   null

End of function qs_search

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.78 ms | 1398 KiB | 21 Q