3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 'apple', 'orange', 'pear', 'banana', 'apple', 'pear', 'kiwi', 'kiwi', 'kiwi' ]; foreach (array_count_values($array) as $value => $count) { printf("%s%s\n", $value, $count > 1 ? " ($count)" :''); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 21
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 21
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 17
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/KOSBA
function name:  (null)
number of ops:  23
compiled vars:  !0 = $array, !1 = $count, !2 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   15     1        INIT_FCALL                                               'array_count_values'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4      > FE_RESET_R                                       $5      $4, ->21
          5    > > FE_FETCH_R                                       ~6      $5, !1, ->21
          6    >   ASSIGN                                                   !2, ~6
   16     7        INIT_FCALL                                               'printf'
          8        SEND_VAL                                                 '%25s%25s%0A'
          9        SEND_VAR                                                 !2
         10        IS_SMALLER                                               1, !1
         11      > JMPZ                                                     ~8, ->17
         12    >   ROPE_INIT                                     3  ~10     '+%28'
         13        ROPE_ADD                                      1  ~10     ~10, !1
         14        ROPE_END                                      2  ~9      ~10, '%29'
         15        QM_ASSIGN                                        ~12     ~9
         16      > JMP                                                      ->18
         17    >   QM_ASSIGN                                        ~12     ''
         18    >   SEND_VAL                                                 ~12
         19        DO_ICALL                                                 
   15    20      > JMP                                                      ->5
         21    >   FE_FREE                                                  $5
   17    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.74 ms | 1006 KiB | 15 Q