3v4l.org

run code in 500+ PHP versions simultaneously
<?php $data[] = array('volume' => 67, 'edition' => 2); $data[] = array('volume' => 86, 'edition' => 1); $data[] = array('volume' => 85, 'edition' => 6); $data[] = array('volume' => 98, 'edition' => 2); $data[] = array('volume' => 86, 'edition' => 6); $data[] = array('volume' => 67, 'edition' => 7); // Obtain a list of columns foreach ($data as $key => $row) { $volume[$key] = $row['volume']; $edition[$key] = $row['edition']; } // Sort the data with volume descending, edition ascending // Add $data as the last parameter, to sort by the common key array_multisort($volume, SORT_DESC, $edition, SORT_ASC, $data); var_dump($data);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 22
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 22
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/57V2F
function name:  (null)
number of ops:  34
compiled vars:  !0 = $data, !1 = $row, !2 = $key, !3 = $volume, !4 = $edition
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN_DIM                                                   !0
          1        OP_DATA                                                      <array>
    3     2        ASSIGN_DIM                                                   !0
          3        OP_DATA                                                      <array>
    4     4        ASSIGN_DIM                                                   !0
          5        OP_DATA                                                      <array>
    5     6        ASSIGN_DIM                                                   !0
          7        OP_DATA                                                      <array>
    6     8        ASSIGN_DIM                                                   !0
          9        OP_DATA                                                      <array>
    7    10        ASSIGN_DIM                                                   !0
         11        OP_DATA                                                      <array>
   10    12      > FE_RESET_R                                           $11     !0, ->22
         13    > > FE_FETCH_R                                           ~12     $11, !1, ->22
         14    >   ASSIGN                                                       !2, ~12
   11    15        FETCH_DIM_R                                          ~15     !1, 'volume'
         16        ASSIGN_DIM                                                   !3, !2
         17        OP_DATA                                                      ~15
   12    18        FETCH_DIM_R                                          ~17     !1, 'edition'
         19        ASSIGN_DIM                                                   !4, !2
         20        OP_DATA                                                      ~17
   10    21      > JMP                                                          ->13
         22    >   FE_FREE                                                      $11
   17    23        INIT_FCALL                                                   'array_multisort'
         24        SEND_REF                                                     !3
         25        SEND_VAL                                                     3
         26        SEND_REF                                                     !4
         27        SEND_VAL                                                     4
         28        SEND_REF                                                     !0
         29        DO_ICALL                                                     
   18    30        INIT_FCALL                                                   'var_dump'
         31        SEND_VAR                                                     !0
         32        DO_ICALL                                                     
         33      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
233.95 ms | 2366 KiB | 15 Q