public function filter(callable $callback) : self
    {
        $entries = array_filter($this->getItems()->getArrayCopy(), $callback);
        $this->getItems()->exchangeArray($entries);
        return $this;
    }
public function filter(callable $callback) : self
    {
        $entries = array_filter($this->getItems()->getArrayCopy(), $callback);
        $this->getItems()->exchangeArray($entries);
        return $this;
    }
public function filter ( callable $ callback ) : self { $ entries = array_filter ( $ this -> getItems ( ) -> getArrayCopy ( ) , $ callback ) ; $ this -> getItems ( ) -> exchangeArray ( $ entries ) ; return $ this ; }
Filter this collection based on callback logic.

@param Closure $callback
@return self
Filter this collection based on callback logic .