public static function all(array $array, callable $predicate)
    {
        foreach ($array as $key => $value) {
            if (! $predicate($value, $key, $array)) {
                return false;
            }
        }

        return true;
    }
public static function all(array $array, callable $predicate)
    {
        foreach ($array as $key => $value) {
            if (! $predicate($value, $key, $array)) {
                return false;
            }
        }

        return true;
    }
public static function all ( array $ array , callable $ predicate ) { foreach ( $ array as $ key => $ value ) { if ( ! $ predicate ( $ value , $ key , $ array ) ) { return false ; } } return true ; }
Returns whether every element of the array satisfies the given predicate or not.
Works with Iterators too.

@param array    $array
@param callable $predicate

@return bool
Returns whether every element of the array satisfies the given predicate or not . Works with Iterators too .