Skip to content

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

Conversation

bugreportuser
Copy link
Contributor

This is a follow-up to #1385 which was abandoned from inactivity. This implementation does have differences:

@bugreportuser bugreportuser changed the title Feature/create array every and array any Implementing array_every() and array_any() Oct 13, 2018
@php-pulls
Copy link

Comment on behalf of petk at php.net:

Labelling

@cmb69
Copy link
Member

cmb69 commented Oct 21, 2018

It seems to me this PR should be discussed on the internals@ mailing list. An RFC might be in order.

@bugreportuser
Copy link
Contributor Author

@petk petk added RFC and removed Feature labels Oct 22, 2018
@carusogabriel
Copy link
Contributor

@bugreportuser What is the status of this RFC? :)

@bugreportuser
Copy link
Contributor Author

@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.

TysonAndre pushed a commit to TysonAndre/php-src that referenced this pull request Aug 29, 2020
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]>
TysonAndre pushed a commit to TysonAndre/php-src that referenced this pull request Dec 18, 2020
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]>
TysonAndre pushed a commit to TysonAndre/php-src that referenced this pull request Dec 18, 2020
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]>
TysonAndre pushed a commit to TysonAndre/php-src that referenced this pull request Feb 3, 2021
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]>
TysonAndre pushed a commit to TysonAndre/php-src that referenced this pull request Feb 6, 2021
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]>
@krakjoe
Copy link
Member

krakjoe commented May 23, 2021

Since the author lost interest in pursuing this with an RFC, I'm closing this one.

@krakjoe krakjoe closed this May 23, 2021
TysonAndre pushed a commit to TysonAndre/php-src that referenced this pull request Jun 2, 2021
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants