src/Collection/ArrayCollection.php
public function any(callable $predicate): bool
    {
        foreach ($this->items as $key => $value) {
            if ($predicate($value, $key)) {
                return true;
            }
        }

        return false;
    }
public function any(callable $predicate): bool
    {
        foreach ($this->items as $key => $value) {
            if ($predicate($value, $key)) {
                return true;
            }
        }

        return false;
    }
public function any ( callable $ predicate ) : bool { foreach ( $ this -> items as $ key => $ value ) { if ( $ predicate ( $ value , $ key ) ) { return true ; } } return false ; }
Checks if any items pass a truth test

Predicate signature:

<code>
function ($value, $key): bool {}
</code>

@param callable $predicate The predicate function

@return bool
Checks if any items pass a truth test