Skip to content

Conversation

remicollet
Copy link
Member

I notice there is no simple way to search all values in an array (to retrieve all the keys)

Here is a simple implementation.

I also add a ZVAL_STR_OR_LONG which can perhaps be moved in Zend, as probably used in lot of places.

7.1 seems a good candidate for a very minor self-contained change (else 7.2/master is fine)

@cmb69
Copy link
Member

cmb69 commented Aug 10, 2016

Perhaps a new function array_search_all() would be better (I find boolean arguments hard to understand, and we're already having $strict).

@remicollet
Copy link
Member Author

We already have array_keys(array, search) (thanks Nikita)

@remicollet remicollet closed this Aug 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants