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); } setlocale(LC_ALL, "en_US.UTF8"); 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/In4Kt
function name:  (null)
number of ops:  17
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'setlocale'
          1        SEND_VAL                                                 6
          2        SEND_VAL                                                 'en_US.UTF8'
          3        DO_ICALL                                                 
    8     4        INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'qs_search'
          6        SEND_VAL                                                 'regular'
          7        DO_FCALL                                      0  $1      
          8        SEND_VAR                                                 $1
          9        DO_ICALL                                                 
    9    10        INIT_FCALL                                               'var_dump'
         11        INIT_FCALL                                               'qs_search'
         12        SEND_VAL                                                 '%D0%A1%D0%B8%D0%BD%D0%BE%D0%B4%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B9'
         13        DO_FCALL                                      0  $3      
         14        SEND_VAR                                                 $3
         15        DO_ICALL                                                 
   10    16      > RETURN                                                   1

Function qs_search:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/In4Kt
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:
151.31 ms | 1399 KiB | 23 Q