any (alias).
Creates a predicate Closure that is true when at least one of the bound predicates returns true for the input value.
/**
* @param callable(mixed):bool ...$callables
* @return Closure(mixed):bool
*/
Comparisons\groupOr(callable ...$callables): ClosureWhen Comparisons\groupOr() 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.
$stringOrInt = Comparisons\groupOr('is_string', 'is_int');
var_dump($stringOrInt('hello')); // true
var_dump($stringOrInt(42)); // true
var_dump($stringOrInt(3.14)); // false