3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 0 => "Sat 2", 1 => "Sun 3", 2 => "Mon 4", 3 => "Tue 5", 4 => "Mon 4" ]; $valuesCounterArr = array_count_values($array); print_r($valuesCounterArr); $finalArr = []; foreach($valuesCounterArr as $key=>$val){ if($val == 1){ $finalArr[] = $key; } } print_r($finalArr);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 17
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 17
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 16
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/1lc6R
function name:  (null)
number of ops:  22
compiled vars:  !0 = $array, !1 = $valuesCounterArr, !2 = $finalArr, !3 = $val, !4 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   11     1        INIT_FCALL                                               'array_count_values'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $6      
          4        ASSIGN                                                   !1, $6
   12     5        INIT_FCALL                                               'print_r'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
   13     8        ASSIGN                                                   !2, <array>
   15     9      > FE_RESET_R                                       $10     !1, ->17
         10    > > FE_FETCH_R                                       ~11     $10, !3, ->17
         11    >   ASSIGN                                                   !4, ~11
   16    12        IS_EQUAL                                                 !3, 1
         13      > JMPZ                                                     ~13, ->16
   17    14    >   ASSIGN_DIM                                               !2
         15        OP_DATA                                                  !4
   15    16    > > JMP                                                      ->10
         17    >   FE_FREE                                                  $10
   21    18        INIT_FCALL                                               'print_r'
         19        SEND_VAR                                                 !2
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.62 ms | 999 KiB | 15 Q