3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arrTags['banana'] = 3; $arrTags['mango'] = 2; $arrTags['apple1'] = 2; $arrTags['orange'] = 4; $arrTags['almond1'] = 2; $tag = []; $num = []; foreach($arrTags as $tag[] => $num[]); array_multisort($num, SORT_DESC, $tag, SORT_ASC, $arrTags); print_r($arrTags);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 19
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 19
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/8UcaZ
function name:  (null)
number of ops:  31
compiled vars:  !0 = $arrTags, !1 = $tag, !2 = $num
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN_DIM                                               !0, 'banana'
          1        OP_DATA                                                  3
    4     2        ASSIGN_DIM                                               !0, 'mango'
          3        OP_DATA                                                  2
    5     4        ASSIGN_DIM                                               !0, 'apple1'
          5        OP_DATA                                                  2
    6     6        ASSIGN_DIM                                               !0, 'orange'
          7        OP_DATA                                                  4
    7     8        ASSIGN_DIM                                               !0, 'almond1'
          9        OP_DATA                                                  2
    9    10        ASSIGN                                                   !1, <array>
   10    11        ASSIGN                                                   !2, <array>
   11    12      > FE_RESET_R                                       $10     !0, ->19
         13    > > FE_FETCH_R                                       ~13     $10, $11, ->19
         14    >   ASSIGN_DIM                                               !2
         15        OP_DATA                                                  $11
         16        ASSIGN_DIM                                               !1
         17        OP_DATA                                                  ~13
         18      > JMP                                                      ->13
         19    >   FE_FREE                                                  $10
   12    20        INIT_FCALL                                               'array_multisort'
         21        SEND_REF                                                 !2
         22        SEND_VAL                                                 3
         23        SEND_REF                                                 !1
         24        SEND_VAL                                                 4
         25        SEND_REF                                                 !0
         26        DO_ICALL                                                 
   14    27        INIT_FCALL                                               'print_r'
         28        SEND_VAR                                                 !0
         29        DO_ICALL                                                 
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.04 ms | 1396 KiB | 17 Q