Skip to content

Commit 877e758

Browse files
authored
array_unshift: Use specialised iteration macro (#20410)
Forgot this while working on GH-20353, but this could avoid some checks depending on the compiler optimizations.
1 parent 36cbc00 commit 877e758

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/standard/array.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3763,7 +3763,7 @@ PHP_FUNCTION(array_unshift)
37633763
zend_hash_next_index_insert_new(&new_hash, &args[i]);
37643764
}
37653765

3766-
ZEND_HASH_FOREACH_STR_KEY_VAL(Z_ARRVAL_P(stack), key, value) {
3766+
ZEND_HASH_MAP_FOREACH_STR_KEY_VAL(Z_ARRVAL_P(stack), key, value) {
37673767
if (key) {
37683768
zend_hash_add_new(&new_hash, key, value);
37693769
} else {

0 commit comments

Comments
 (0)