public static function uniq($collection = null, $is_sorted = null, $iterator = null)
    {
        $return = array();
        if (count($collection) === 0) {
            return $return;
        }
        
        $calculated = array();
        foreach ($collection as $item) {
            $val = (!is_null($iterator)) ? $iterator($item) : $item;
            if (is_bool(array_search($val, $calculated, true))) {
                $calculated[] = $val;
                $return[] = $item;
            }
        }
        
        return $return;
    }
public static function uniq($collection = null, $is_sorted = null, $iterator = null)
    {
        $return = array();
        if (count($collection) === 0) {
            return $return;
        }
        
        $calculated = array();
        foreach ($collection as $item) {
            $val = (!is_null($iterator)) ? $iterator($item) : $item;
            if (is_bool(array_search($val, $calculated, true))) {
                $calculated[] = $val;
                $return[] = $item;
            }
        }
        
        return $return;
    }
public static function uniq ( $ collection = null , $ is_sorted = null , $ iterator = null ) { $ return = array ( ) ; if ( count ( $ collection ) === 0 ) { return $ return ; } $ calculated = array ( ) ; foreach ( $ collection as $ item ) { $ val = ( ! is_null ( $ iterator ) ) ? $ iterator ( $ item ) : $ item ; if ( is_bool ( array_search ( $ val , $ calculated , true ) ) ) { $ calculated [ ] = $ val ; $ return [ ] = $ item ; } } return $ return ; }
Return an array of the unique values
Return an array of the unique values