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") ); $ary_main2 = $ary_main; $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], $ary_main2); foreach($ary_main2 as $ary) { echo $ary["name"],"\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 17, Position 2 = 22
Branch analysis from position: 17
2 jumps found. (Code = 78) Position 1 = 18, Position 2 = 22
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 22
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: 22
filename:       /in/fdFA8
function name:  (null)
number of ops:  43
compiled vars:  !0 = $ary_main, !1 = $ary_main2, !2 = $args, !3 = $ary
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   14     1        ASSIGN                                                   !1, !0
   17     2        ASSIGN_DIM                                               !2
          3        OP_DATA                                                  <array>
   18     4        ASSIGN_DIM                                               !2
          5        OP_DATA                                                  4
   19     6        ASSIGN_DIM                                               !2
          7        OP_DATA                                                  <array>
   20     8        ASSIGN_DIM                                               !2
          9        OP_DATA                                                  3
   21    10        FETCH_DIM_W                                      $10     !2
         11        ASSIGN_REF                                               $10, !0
   24    12        INIT_FCALL                                               'array_multisort'
         13        SEND_ARRAY                                               !2
         14        CHECK_UNDEF_ARGS                                         
         15        DO_FCALL                                      0          
   26    16      > FE_RESET_R                                       $13     !0, ->22
         17    > > FE_FETCH_R                                               $13, !3, ->22
   28    18    >   FETCH_DIM_R                                      ~14     !3, 'name'
         19        ECHO                                                     ~14
         20        ECHO                                                     '%0A'
   26    21      > JMP                                                      ->17
         22    >   FE_FREE                                                  $13
   32    23        ECHO                                                     '%0A-----------%0A'
   34    24        INIT_FCALL                                               'array_multisort'
         25        FETCH_DIM_W                                      $15     !2, 0
         26        SEND_REF                                                 $15
         27        FETCH_DIM_W                                      $16     !2, 1
         28        SEND_REF                                                 $16
         29        FETCH_DIM_W                                      $17     !2, 2
         30        SEND_REF                                                 $17
         31        FETCH_DIM_W                                      $18     !2, 3
         32        SEND_REF                                                 $18
         33        SEND_REF                                                 !1
         34        DO_ICALL                                                 
   37    35      > FE_RESET_R                                       $20     !1, ->41
         36    > > FE_FETCH_R                                               $20, !3, ->41
   39    37    >   FETCH_DIM_R                                      ~21     !3, 'name'
         38        ECHO                                                     ~21
         39        ECHO                                                     '%0A'
   37    40      > JMP                                                      ->36
         41    >   FE_FREE                                                  $20
   40    42      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.02 ms | 1400 KiB | 15 Q