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