Syntax: all (predicate {(v, k) ==> result})
Determines whether all elements of a sequence satisfy a condition. The enumeration of source is stopped as soon as the result can be determined.
public function all($predicate)
{
$predicate = Utils::createLambda($predicate, 'v,k');
foreach ($this as $k => $v) {
if (!$predicate($v, $k)) {
return false;
}
}
return true;
}