pike.ida.liu.se
Search for
Home > Docs > Pike reference

[Top]
Array

Array.any()


Method any

int(0..1) any(array a, function(int(0..0):mixed) predicate, mixed ... extra_args)

Description

Returns 1 if any of the elements in a fulfills the requirement predicate ( a [i], @extra_args ), otherwise 0. The predicate should return non-zero for an element that meets the requirements and zero for those that do not.

Example

Array.any( ({ 2, 4, 6, 8 }), `>, 5 )

See also

all , has_value

Module reference for Pike v7.8 release 116, 2008-12-31