From 877e758a3b5b7886e52c40b6f6020ae3591541cd Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+ndossche@users.noreply.github.com> Date: Thu, 6 Nov 2025 23:36:43 +0100 Subject: [PATCH] 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. --- 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 9f7709092dd..0ef700f14a7 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 {