phpstreams\Stream::distinct PHP Method

distinct() public method

This stream will yield every distinct value only once. Note that internally, it uses in_array for lookups. This is problematic for large numbers of distinct elements, as the complexity of this stream filter becomes O(n * m) with n the number of elements and m the number of distinct values. This mapping preserves key => value relationships, and will yield the values with the first keys encountered.
public distinct ( type $strict = false ) : Stream
$strict type whether to use strict comparisons for uniqueness.
return Stream
    public function distinct($strict = false)
    {
        return new DistinctOperation($this, $strict);
    }