array_any
array_any ( $array, $callback )
Parameters:- (array) array The array to check.
- (callable) callback The callback to run for each element.
Returns:- (bool) True if any element in the array passes the `$callback`, otherwise false.
Defined at: - Introduced in WordPress: 6.8.0
- Deprecated in WordPress: —
Description
Polyfill for `array_any()` function added in PHP 8.4.Checks if any element of an array passes a given callback.