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:

Description

Polyfill for `array_all()` function added in PHP 8.4.Checks if all elements of an array pass a given callback.

Related Functions

array_any, array_is_list, array_find, array_key_last, wp_kses_array_lc

Top Google Results

User discussions

wpseek mobile