From a957c0c8f0695eb824c595a11c9e6df19901e28b Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+ndossche@users.noreply.github.com> Date: Thu, 6 Nov 2025 23:11:19 +0100 Subject: [PATCH] array_unshift: Use specialised iteration macro Forgot this while working on GH-20353, but this could avoid some checks depending on the compiler optimizations. --- ext/standard/array.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/standard/array.c b/ext/standard/array.c index 9f7709092dde..0ef700f14a74 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -3763,7 +3763,7 @@ PHP_FUNCTION(array_unshift) zend_hash_next_index_insert_new(&new_hash, &args[i]); } - ZEND_HASH_FOREACH_STR_KEY_VAL(Z_ARRVAL_P(stack), key, value) { + ZEND_HASH_MAP_FOREACH_STR_KEY_VAL(Z_ARRVAL_P(stack), key, value) { if (key) { zend_hash_add_new(&new_hash, key, value); } else {