3v4l.org

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

Function qs_search:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Z71Xj
function name:  qs_search
number of ops:  12
compiled vars:  !0 = $qs, !1 = $query_string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        ASSIGN                                                   !1, <array>
    4     2        INIT_FCALL                                               'basename'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        ASSIGN_DIM                                               !1, 'search'
          6        OP_DATA                                                  $4
    5     7        INIT_FCALL                                               'http_build_query'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $5      
         10      > RETURN                                                   $5
    6    11*     > RETURN                                                   null

End of function qs_search

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.68 ms | 1397 KiB | 21 Q