Supported Versions: PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8
Filters elements of an array using a callback function
<?php array_filter(array $array, ?callable $callback = null, int $mode = 0): array
<?php     public function filter(?callable $f = null): self

    {

        return is_null($f)

            ? new static(array_values(array_filter($this->items)))

            : new static(array_values(array_filter($this->items, $f)));

    }
<?php     {

        return is_null($f)

            ? new static(array_values(array_filter($this->items)))

            : new static(array_values(array_filter($this->items, $f)));

    }



    public function first(callable $f)