A::some()
Checks if at least one element in the array passes the test
A::some(array $array, callable(mixed $value, (int|string) $key, array $array): bool $test): bool
Parameters
| Name | Type | Default |
|---|---|---|
| $arrayrequired | array |
no default value |
| $testrequired | callable(mixed $value, (intorstring) $key, array $array): bool |
no default value |
Return type
bool
Parent class
Examples
$array = [1, 30, 39, 29, 10, 'foo' => 12, 13];