Add new flag ARRAY_FILTER_PACK_RESULT#22155
Conversation
|
Requested by someone at PHPTek and seemed pretty simple to implement
This would eliminate the need for an extra method call and improve performance Plenty of existing code would use this: https://github.com/search?q=language%3Aphp%20-is%3Afork%20-is%3Aarchived%20%2F%5C%5C%3Farray_values%5C(%5Cs*%5C%5C%3Farray_filter%2F&type=code let me know if an RFC is needed, not sure if this is small enough or not |
|
Excuse my ignorance. Isn't technicly Wouldn't |
|
I was working on this topic in the past, and there are already some opinions about the proper direction. #18291 It would require discussion on the internals about the clear and consistent direction. I would be happy for the |
A packed array is one with consecutive integer indexes, basically an array that would pass https://www.php.net/manual/en/function.array-is-list.php - see Lines 1612 to 1615 in 9898293 @iluuu1994 @TimWolla you participated in the discussion on #18291 - thoughts on adding this as a new flag? |
No description provided.