3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ary_main = array( array( "name" => "PSGR004"), array( "name" => "HRCO005"), array( "name" => "HRCO055"), array( "name" => "SAGR110"), array( "name" => "SAGR105"), array( "name" => "SAGR105"), array( "name" => "MAPR161"), array( "name" => "SAGR184") ); $args[] = array(3,4,6,2,0,1,6,1); $args[] = SORT_ASC; $args[] = array("psgr040","hrco055","hrco055","sagr110","sagr105","sagr105","mapr161","sagr184"); $args[] = SORT_DESC; $args[] =& $ary_main; call_user_func_array("array_multisort", $args); foreach($ary_main as $ary) { echo $ary["name"],"\n"; } echo "\n-----------\n"; array_multisort($args[0], $args[1], $args[2], $args[3], $args[4]); foreach($ary_main as $ary) { echo $ary["name"],"\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 21
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 21
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 21
2 jumps found. (Code = 77) Position 1 = 36, Position 2 = 41
Branch analysis from position: 36
2 jumps found. (Code = 78) Position 1 = 37, Position 2 = 41
Branch analysis from position: 37
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 41
Branch analysis from position: 21
filename:       /in/lJVk4
function name:  (null)
number of ops:  43
compiled vars:  !0 = $ary_main, !1 = $args, !2 = $ary
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   15     1        ASSIGN_DIM                                               !1
          2        OP_DATA                                                  <array>
   16     3        ASSIGN_DIM                                               !1
          4        OP_DATA                                                  4
   17     5        ASSIGN_DIM                                               !1
          6        OP_DATA                                                  <array>
   18     7        ASSIGN_DIM                                               !1
          8        OP_DATA                                                  3
   19     9        FETCH_DIM_W                                      $8      !1
         10        ASSIGN_REF                                               $8, !0
   22    11        INIT_FCALL                                               'array_multisort'
         12        SEND_ARRAY                                               !1
         13        CHECK_UNDEF_ARGS                                         
         14        DO_FCALL                                      0          
   24    15      > FE_RESET_R                                       $11     !0, ->21
         16    > > FE_FETCH_R                                               $11, !2, ->21
   26    17    >   FETCH_DIM_R                                      ~12     !2, 'name'
         18        ECHO                                                     ~12
         19        ECHO                                                     '%0A'
   24    20      > JMP                                                      ->16
         21    >   FE_FREE                                                  $11
   30    22        ECHO                                                     '%0A-----------%0A'
   32    23        INIT_FCALL                                               'array_multisort'
         24        FETCH_DIM_W                                      $13     !1, 0
         25        SEND_REF                                                 $13
         26        FETCH_DIM_W                                      $14     !1, 1
         27        SEND_REF                                                 $14
         28        FETCH_DIM_W                                      $15     !1, 2
         29        SEND_REF                                                 $15
         30        FETCH_DIM_W                                      $16     !1, 3
         31        SEND_REF                                                 $16
         32        FETCH_DIM_W                                      $17     !1, 4
         33        SEND_REF                                                 $17
         34        DO_ICALL                                                 
   35    35      > FE_RESET_R                                       $19     !0, ->41
         36    > > FE_FETCH_R                                               $19, !2, ->41
   37    37    >   FETCH_DIM_R                                      ~20     !2, 'name'
         38        ECHO                                                     ~20
         39        ECHO                                                     '%0A'
   35    40      > JMP                                                      ->36
         41    >   FE_FREE                                                  $19
   38    42      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.47 ms | 1400 KiB | 15 Q