3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array(12,43,66,21,56,43,43,78,78,100,43,43,43,21); foreach($arr as $key=>$item){ if(array_count_values($arr)[$item] > 1){ echo "Found Matched value : ".$item."\n"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 14
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 13
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/C3dLj
function name:  (null)
number of ops:  16
compiled vars:  !0 = $arr, !1 = $item, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1      > FE_RESET_R                                       $4      !0, ->14
          2    > > FE_FETCH_R                                       ~5      $4, !1, ->14
          3    >   ASSIGN                                                   !2, ~5
    5     4        INIT_FCALL                                               'array_count_values'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $7      
          7        FETCH_DIM_R                                      ~8      $7, !1
          8        IS_SMALLER                                               1, ~8
          9      > JMPZ                                                     ~9, ->13
    6    10    >   CONCAT                                           ~10     'Found+Matched+value+%3A+', !1
         11        CONCAT                                           ~11     ~10, '%0A'
         12        ECHO                                                     ~11
    4    13    > > JMP                                                      ->2
         14    >   FE_FREE                                                  $4
    8    15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.27 ms | 1400 KiB | 15 Q