-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Implementing array_every() and array_any() #3597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementing array_every() and array_any() #3597
Conversation
Comment on behalf of petk at php.net: Labelling |
It seems to me this PR should be discussed on the internals@ mailing list. An RFC might be in order. |
@cmb69 I've opened an internals@ discussion: http://news.php.net/php.internals/103357 |
@bugreportuser What is the status of this RFC? :) |
@carusogabriel I'm not working on one. There wasn't any interest from internals@ and I'm not interested enough in it to create an RFC. If anyone else wants to make one, I can fix the implementation. |
Create iterator_every() and iterator_any() This has merge conflicts which were resolved in the subsequent commit(s). This commit was used as a basis for implementing an alternate approach to checking if all()/any() elements in an iterable satisfy a predicate. Cherry-picked from phpGH-3597 Co-Authored-By: bugreportuser Co-Authored-By: Tyson Andre <[email protected]>
Create iterator_every() and iterator_any() This has merge conflicts which were resolved in the subsequent commit(s). This commit was used as a basis for implementing an alternate approach to checking if all()/any() elements in an iterable satisfy a predicate. Cherry-picked from phpGH-3597 with modifications Combine helpers into any() and all(), modernize for php 8 Properly free the result of the callback if it was a refcounted type such as a string/array. Fix the default value of the callback. Co-Authored-By: bugreportuser Co-Authored-By: Tyson Andre <[email protected]>
Create iterator_every() and iterator_any() This has merge conflicts which were resolved in the subsequent commit(s). This commit was used as a basis for implementing an alternate approach to checking if all()/any() elements in an iterable satisfy a predicate. Cherry-picked from phpGH-3597 with modifications Combine helpers into any() and all(), modernize for php 8 Properly free the result of the callback if it was a refcounted type such as a string/array. Fix the default value of the callback. Co-Authored-By: bugreportuser Co-Authored-By: Tyson Andre <[email protected]>
Create iterator_every() and iterator_any() This has merge conflicts which were resolved in the subsequent commit(s). This commit was used as a basis for implementing an alternate approach to checking if all()/any() elements in an iterable satisfy a predicate. Cherry-picked from phpGH-3597 with modifications Combine helpers into any() and all(), modernize for php 8 Properly free the result of the callback if it was a refcounted type such as a string/array. Fix the default value of the callback. Co-Authored-By: bugreportuser Co-Authored-By: Tyson Andre <[email protected]>
Create iterator_every() and iterator_any() This has merge conflicts which were resolved in the subsequent commit(s). This commit was used as a basis for implementing an alternate approach to checking if all()/any() elements in an iterable satisfy a predicate. Cherry-picked from phpGH-3597 with modifications Combine helpers into any() and all(), modernize for php 8 Properly free the result of the callback if it was a refcounted type such as a string/array. Fix the default value of the callback. Co-Authored-By: bugreportuser Co-Authored-By: Tyson Andre <[email protected]>
Since the author lost interest in pursuing this with an RFC, I'm closing this one. |
Create iterator_every() and iterator_any() This has merge conflicts which were resolved in the subsequent commit(s). This commit was used as a basis for implementing an alternate approach to checking if all()/any() elements in an iterable satisfy a predicate. Cherry-picked from phpGH-3597 with modifications Combine helpers into any() and all(), modernize for php 8 Properly free the result of the callback if it was a refcounted type such as a string/array. Fix the default value of the callback. Co-Authored-By: bugreportuser Co-Authored-By: Tyson Andre <[email protected]>
This is a follow-up to #1385 which was abandoned from inactivity. This implementation does have differences:
iterator_every()
anditerator_any()
were added instead of usingtraversable
parameters, waiting for https://bugs.php.net/bug.php?id=76865