mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
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.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user