Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Flesh out ZEND_HASH_REVERSE_FOREACH_* macros#6080

Closed
twose wants to merge 1 commit into
php:masterphp/php-src:masterfrom
twose:foreachtwose/php-src:foreachCopy head branch name to clipboard
Closed

Flesh out ZEND_HASH_REVERSE_FOREACH_* macros#6080
twose wants to merge 1 commit into
php:masterphp/php-src:masterfrom
twose:foreachtwose/php-src:foreachCopy head branch name to clipboard

Conversation

@twose

@twose twose commented Sep 4, 2020

Copy link
Copy Markdown
Member

wonder if iterating over buckets in reverse would be more efficient for rejecting arrays that weren't list, here and in ext/json

E.g. if you had an array with thousands of elements, but a few were unset in the middle of the array, then the key of the last bucket (that wasn't unset) wouldn't be zend_hash_num_elements - 1

#4886 (comment)

@TysonAndre

I agree with you, I've been looking forward to this feature for a long time, thanks.

And It looks we need ZEND_HASH_REVERSE_FOREACH_KEY now.

@php-pulls php-pulls closed this in 40e5238 Sep 9, 2020
@twose twose deleted the foreach branch September 9, 2020 07:25
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.