3v4l.org

run code in 500+ PHP versions simultaneously
<?php $arr = [ 0 => "Sat 2", 1 => "Sun 3", 2 => "Mon 4", 3 => "Tue 5", 4 => "Mon 4", ]; $arr = array_diff($arr, array_diff_assoc($arr, array_unique($arr))); print_r($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3K8ue
function name:  (null)
number of ops:  17
compiled vars:  !0 = $arr
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, <array>
    9     1        INIT_FCALL                                                   'array_diff'
          2        SEND_VAR                                                     !0
          3        INIT_FCALL                                                   'array_diff_assoc'
          4        SEND_VAR                                                     !0
          5        INIT_FCALL                                                   'array_unique'
          6        SEND_VAR                                                     !0
          7        DO_ICALL                                             $2      
          8        SEND_VAR                                                     $2
          9        DO_ICALL                                             $3      
         10        SEND_VAR                                                     $3
         11        DO_ICALL                                             $4      
         12        ASSIGN                                                       !0, $4
   10    13        INIT_FCALL                                                   'print_r'
         14        SEND_VAR                                                     !0
         15        DO_ICALL                                                     
         16      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
154.35 ms | 1892 KiB | 17 Q