all (alias).
Creates a predicate Closure that is true only when every bound predicate returns true for the input value.
/**
* @param callable(mixed):bool ...$callables
* @return Closure(mixed):bool
*/
Comparisons\groupAnd(callable ...$callables): ClosureWhen Comparisons\groupAnd() is called, it returns the following Closure which can be used like a regular function.
/**
* @param mixed $value
* @return bool
*/
$function ($value): boolThis can be used to create a simple closure which can be used as a regular function.
$adultString = Comparisons\groupAnd(
'is_string',
fn($s) => strlen($s) >= 18
);
var_dump($adultString('hello world world world')); // true
var_dump($adultString('short')); // false
var_dump($adultString(12345678901234567890)); // false (not string)