3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.42 ms | 1401 KiB | 21 Q