public function filter($callback = null)
    {
        if (is_null($callback)) {
            return new static(array_filter($this->array)); 
        }
        return new static(array_filter($this->array, $callback));
    }
public function filter($callback = null)
    {
        if (is_null($callback)) {
            return new static(array_filter($this->array)); 
        }
        return new static(array_filter($this->array, $callback));
    }
public function filter ( $ callback = null ) { if ( is_null ( $ callback ) ) { return new static ( array_filter ( $ this -> array ) ) ; } return new static ( array_filter ( $ this -> array , $ callback ) ) ; }
Filters the array by a given callback.

@param Callable $callback
@return self
Filters the array by a given callback .