3v4l.org

run code in 500+ PHP versions simultaneously
<?php $queryStrings = [ 'cheese=french', 'pizza=large&cheese=french', 'cheese=french&pizza=small', 'cheese=italian', ]; var_export( array_map( function($qs) { parse_str($qs, $result); ksort($result); return http_build_query($result); }, $queryStrings ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qmuco
function name:  (null)
number of ops:  10
compiled vars:  !0 = $queryStrings
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   10     1        INIT_FCALL                                                   'var_export'
   11     2        INIT_FCALL                                                   'array_map'
   12     3        DECLARE_LAMBDA_FUNCTION                              ~2      [0]
   16     4        SEND_VAL                                                     ~2
   17     5        SEND_VAR                                                     !0
   11     6        DO_ICALL                                             $3      
   17     7        SEND_VAR                                                     $3
   10     8        DO_ICALL                                                     
   19     9      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qmuco
function name:  {closure:/in/qmuco:12}
number of ops:  13
compiled vars:  !0 = $qs, !1 = $result
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   12     0  E >   RECV                                                 !0      
   13     1        INIT_FCALL                                                   'parse_str'
          2        SEND_VAR                                                     !0
          3        SEND_REF                                                     !1
          4        DO_ICALL                                                     
   14     5        INIT_FCALL                                                   'ksort'
          6        SEND_REF                                                     !1
          7        DO_ICALL                                                     
   15     8        INIT_FCALL                                                   'http_build_query'
          9        SEND_VAR                                                     !1
         10        DO_ICALL                                             $4      
         11      > RETURN                                                       $4
   16    12*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
146.21 ms | 1787 KiB | 18 Q