3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ "QLogic BCM57810 10 Gigabit Ethernet (NDIS VBD Client)", "Microsoft Network Adapter Multiplexor Driver", "Microsoft Network Adapter Multiplexor Driver Simplified", "QLogic BCM57810 10 Gigabit Ethernet (NDIS VBD Client) #75", "QLogic BCM57810 10 Gigabit Ethernet (NDIS VBD Client)", "Microsoft Network Adapter Multiplexor Driver", "QLogic BCM57810 10 Gigabit Ethernet (NDIS VBD Client)", "QLogic BCM57810 10 Gigabit Ethernet (NDIS VBD Client)", ]; $lookup = []; foreach (array_count_values($array) as $value => $count) { if ($count > 1) { $lookup[$value] = 0; } } foreach ($array as &$value) { $value .= (isset($lookup[$value]) ? "_" . ++$lookup[$value] : ''); } var_export($array);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 13
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 12
Branch analysis from position: 13
2 jumps found. (Code = 125) Position 1 = 15, Position 2 = 26
Branch analysis from position: 15
2 jumps found. (Code = 126) Position 1 = 16, Position 2 = 26
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 23
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
Branch analysis from position: 13
filename:       /in/olJ1o
function name:  (null)
number of ops:  31
compiled vars:  !0 = $array, !1 = $lookup, !2 = $count, !3 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   14     1        ASSIGN                                                   !1, <array>
   15     2        INIT_FCALL                                               'array_count_values'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $6      
          5      > FE_RESET_R                                       $7      $6, ->13
          6    > > FE_FETCH_R                                       ~8      $7, !2, ->13
          7    >   ASSIGN                                                   !3, ~8
   16     8        IS_SMALLER                                               1, !2
          9      > JMPZ                                                     ~10, ->12
   17    10    >   ASSIGN_DIM                                               !1, !3
         11        OP_DATA                                                  0
   15    12    > > JMP                                                      ->6
         13    >   FE_FREE                                                  $7
   20    14      > FE_RESET_RW                                      $12     !0, ->26
         15    > > FE_FETCH_RW                                              $12, !3, ->26
   21    16    >   ISSET_ISEMPTY_DIM_OBJ                         0          !1, !3
         17      > JMPZ                                                     ~13, ->23
         18    >   FETCH_DIM_RW                                     $14     !1, !3
         19        PRE_INC                                          ~15     $14
         20        CONCAT                                           ~16     '_', ~15
         21        QM_ASSIGN                                        ~17     ~16
         22      > JMP                                                      ->24
         23    >   QM_ASSIGN                                        ~17     ''
         24    >   ASSIGN_OP                                     8          !3, ~17
   20    25      > JMP                                                      ->15
         26    >   FE_FREE                                                  $12
   24    27        INIT_FCALL                                               'var_export'
         28        SEND_VAR                                                 !0
         29        DO_ICALL                                                 
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.93 ms | 1012 KiB | 15 Q