3v4l.org

run code in 300+ PHP versions simultaneously
<?php $Test = array( array("a"=>"004", "n"=>"03"), array("a"=>"003", "n"=>"02"), array("a"=>"001", "n"=>"02"), array("a"=>"005", "n"=>"01"), array("a"=>"001", "n"=>"01"), array("a"=>"004", "n"=>"02"), array("a"=>"003", "n"=>"01"), array("a"=>"004", "n"=>"01") ); $orderBy = ['a', 'n']; $params = array_map(fn($colName) => array_column($Test, $colName), $orderBy); $params[] = &$Test; array_multisort(...$params); var_export($Test);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iPdqN
function name:  (null)
number of ops:  19
compiled vars:  !0 = $Test, !1 = $orderBy, !2 = $params
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   14     1        ASSIGN                                                   !1, <array>
   15     2        INIT_FCALL                                               'array_map'
          3        DECLARE_LAMBDA_FUNCTION                          ~5      [0]
          4        BIND_LEXICAL                                             ~5, !0
          5        SEND_VAL                                                 ~5
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $6      
          8        ASSIGN                                                   !2, $6
   16     9        FETCH_DIM_W                                      $8      !2
         10        ASSIGN_REF                                               $8, !0
   17    11        INIT_FCALL                                               'array_multisort'
         12        SEND_UNPACK                                              !2
         13        CHECK_UNDEF_ARGS                                         
         14        DO_ICALL                                                 
   18    15        INIT_FCALL                                               'var_export'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                                 
         18      > 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/iPdqN
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $colName, !1 = $Test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        INIT_FCALL                                               'array_column'
          3        SEND_VAR                                                 !1
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6      > RETURN                                                   $2
          7*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.81 ms | 1005 KiB | 17 Q