3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = ['a', 'c', 'a', 'b', 'c', 'c']; $count = array_count_values($input); $duplicated = array_keys(array_diff($count, [1])); var_export($duplicated); echo PHP_EOL; echo implode(", ", $duplicated);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2HS8e
function name:  (null)
number of ops:  23
compiled vars:  !0 = $input, !1 = $count, !2 = $duplicated
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'array_count_values'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
    5     5        INIT_FCALL                                               'array_keys'
          6        INIT_FCALL                                               'array_diff'
          7        SEND_VAR                                                 !1
          8        SEND_VAL                                                 <array>
          9        DO_ICALL                                         $6      
         10        SEND_VAR                                                 $6
         11        DO_ICALL                                         $7      
         12        ASSIGN                                                   !2, $7
    6    13        INIT_FCALL                                               'var_export'
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                                 
    7    16        ECHO                                                     '%0A'
    8    17        INIT_FCALL                                               'implode'
         18        SEND_VAL                                                 '%2C+'
         19        SEND_VAR                                                 !2
         20        DO_ICALL                                         $10     
         21        ECHO                                                     $10
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.05 ms | 1009 KiB | 18 Q