On Mon, Feb 8, 2021, at 8:32 AM, tyson andre wrote: > Hi internals, > > Voting has started on https://wiki.php.net/rfc/any_all_on_iterable and > ends on 2021-02-22. > > This RFC proposes to add the functions `PHP\iterable\any(iterable > $input, ?callable $callback = null): bool` and `PHP\iterable\all(...)` > to PHP's standard library's function set, using the namespace preferred > in the previous straw poll. > > There is a primary vote on whether to add the functions, and a > secondary vote on the name to use within the `PHP\iterable` namespace. > > Thanks, > - Tyson > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php
Ak! I literally just finished reading it and wanted to note a lack of clarity on one point. :-) The signature of the callback is never specified explicitly. The ternary is a bit confusing. I assume the signature is callable(mixed): bool But that's not made explicit. It's also not made explict that omitting the callable collapses to "is truthy". That's a sensible thing to do, but it's not stated explicitly anywhere, just inferred from the code sample. I'm not sure if it's safe to clarify at this point as the vote just started. --Larry Garfield -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php