3v4l.org

run code in 300+ PHP versions simultaneously
<?php function qs_search($qs) { $query_string = array(); $query_string['search'] = $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/i5Z2j
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/i5Z2j
function name:  qs_search
number of ops:  9
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        ASSIGN_DIM                                               !1, 'search'
          3        OP_DATA                                                  !0
    5     4        INIT_FCALL                                               'http_build_query'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $4      
          7      > RETURN                                                   $4
    6     8*     > RETURN                                                   null

End of function qs_search

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.36 ms | 1398 KiB | 19 Q