3v4l.org

run code in 300+ PHP versions simultaneously
<?php foreach ($data as $key => $row) { $volume[$key] = $row['volume']; $edition[$key] = $row['edition']; } print_r($volume); // 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); print_r($data);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 1, Position 2 = 10
Branch analysis from position: 1
2 jumps found. (Code = 78) Position 1 = 2, Position 2 = 10
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 1
Branch analysis from position: 1
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/7J95D
function name:  (null)
number of ops:  25
compiled vars:  !0 = $data, !1 = $row, !2 = $key, !3 = $volume, !4 = $edition
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E > > FE_RESET_R                                       $5      !0, ->10
          1    > > FE_FETCH_R                                       ~6      $5, !1, ->10
          2    >   ASSIGN                                                   !2, ~6
    3     3        FETCH_DIM_R                                      ~9      !1, 'volume'
          4        ASSIGN_DIM                                               !3, !2
          5        OP_DATA                                                  ~9
    4     6        FETCH_DIM_R                                      ~11     !1, 'edition'
          7        ASSIGN_DIM                                               !4, !2
          8        OP_DATA                                                  ~11
    2     9      > JMP                                                      ->1
         10    >   FE_FREE                                                  $5
    6    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !3
         13        DO_ICALL                                                 
    9    14        INIT_FCALL                                               'array_multisort'
         15        SEND_REF                                                 !3
         16        SEND_VAL                                                 3
         17        SEND_REF                                                 !4
         18        SEND_VAL                                                 4
         19        SEND_REF                                                 !0
         20        DO_ICALL                                                 
   10    21        INIT_FCALL                                               'print_r'
         22        SEND_VAR                                                 !0
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.76 ms | 1395 KiB | 17 Q