3v4l.org

run code in 300+ PHP versions simultaneously
<?php function array_not_unique(array $a): array { return array_diff_key( $a, array_unique($a) ); } $array = [ 'apple', 'orange', 'pear', 'banana', 'apple', 'pear', 'kiwi', 'kiwi', 'kiwi' ]; var_export(array_not_unique($array));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3FHfn
function name:  (null)
number of ops:  8
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ASSIGN                                                   !0, <array>
   23     1        INIT_FCALL                                               'var_export'
          2        INIT_FCALL                                               'array_not_unique'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0  $2      
          5        SEND_VAR                                                 $2
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function array_not_unique:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3FHfn
function name:  array_not_unique
number of ops:  12
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'array_diff_key'
    6     2        SEND_VAR                                                 !0
    7     3        INIT_FCALL                                               'array_unique'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $1      
          6        SEND_VAR                                                 $1
    5     7        DO_ICALL                                         $2      
    7     8        VERIFY_RETURN_TYPE                                       $2
          9      > RETURN                                                   $2
    9    10*       VERIFY_RETURN_TYPE                                       
         11*     > RETURN                                                   null

End of function array_not_unique

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.2 ms | 1009 KiB | 17 Q