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") ); $org = $main_ary; $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], $org); foreach($ary_main 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/l2g2c
function name:  (null)
number of ops:  43
compiled vars:  !0 = $ary_main, !1 = $org, !2 = $main_ary, !3 = $args, !4 = $ary
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   14     1        ASSIGN                                                   !1, !2
   16     2        ASSIGN_DIM                                               !3
          3        OP_DATA                                                  <array>
   17     4        ASSIGN_DIM                                               !3
          5        OP_DATA                                                  4
   18     6        ASSIGN_DIM                                               !3
          7        OP_DATA                                                  <array>
   19     8        ASSIGN_DIM                                               !3
          9        OP_DATA                                                  3
   20    10        FETCH_DIM_W                                      $11     !3
         11        ASSIGN_REF                                               $11, !0
   23    12        INIT_FCALL                                               'array_multisort'
         13        SEND_ARRAY                                               !3
         14        CHECK_UNDEF_ARGS                                         
         15        DO_FCALL                                      0          
   25    16      > FE_RESET_R                                       $14     !0, ->22
         17    > > FE_FETCH_R                                               $14, !4, ->22
   27    18    >   FETCH_DIM_R                                      ~15     !4, 'name'
         19        ECHO                                                     ~15
         20        ECHO                                                     '%0A'
   25    21      > JMP                                                      ->17
         22    >   FE_FREE                                                  $14
   31    23        ECHO                                                     '%0A-----------%0A'
   33    24        INIT_FCALL                                               'array_multisort'
         25        FETCH_DIM_W                                      $16     !3, 0
         26        SEND_REF                                                 $16
         27        FETCH_DIM_W                                      $17     !3, 1
         28        SEND_REF                                                 $17
         29        FETCH_DIM_W                                      $18     !3, 2
         30        SEND_REF                                                 $18
         31        FETCH_DIM_W                                      $19     !3, 3
         32        SEND_REF                                                 $19
         33        SEND_REF                                                 !1
         34        DO_ICALL                                                 
   36    35      > FE_RESET_R                                       $21     !0, ->41
         36    > > FE_FETCH_R                                               $21, !4, ->41
   38    37    >   FETCH_DIM_R                                      ~22     !4, 'name'
         38        ECHO                                                     ~22
         39        ECHO                                                     '%0A'
   36    40      > JMP                                                      ->36
         41    >   FE_FREE                                                  $21
   39    42      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.38 ms | 1400 KiB | 15 Q