@@ -2610,7 +2610,7 @@ PHP_FUNCTION(substr_replace)
2610
2610
2611
2611
from_idx = len_idx = repl_idx = 0 ;
2612
2612
2613
- ZEND_HASH_FOREACH_KEY_VAL (Z_ARRVAL_P (str ), num_index , str_index , tmp_str ) {
2613
+ ZEND_HASH_FOREACH_KEY_VAL_IND (Z_ARRVAL_P (str ), num_index , str_index , tmp_str ) {
2614
2614
zend_string * tmp_orig_str ;
2615
2615
zend_string * orig_str = zval_get_tmp_string (tmp_str , & tmp_orig_str );
2616
2616
@@ -3062,7 +3062,7 @@ static void php_strtr_array(zval *return_value, zend_string *input, HashTable *p
3062
3062
zend_string * key_used ;
3063
3063
/* we have to rebuild HashTable with numeric keys */
3064
3064
zend_hash_init (& str_hash , zend_hash_num_elements (pats ), NULL , NULL , 0 );
3065
- ZEND_HASH_FOREACH_KEY_VAL (pats , num_key , str_key , entry ) {
3065
+ ZEND_HASH_FOREACH_KEY_VAL_IND (pats , num_key , str_key , entry ) {
3066
3066
if (UNEXPECTED (!str_key )) {
3067
3067
key_used = zend_long_to_str (num_key );
3068
3068
len = ZSTR_LEN (key_used );
@@ -3508,7 +3508,7 @@ PHP_FUNCTION(strtr)
3508
3508
zend_string * str_key , * tmp_str , * replace , * tmp_replace ;
3509
3509
zval * entry ;
3510
3510
3511
- ZEND_HASH_FOREACH_KEY_VAL (pats , num_key , str_key , entry ) {
3511
+ ZEND_HASH_FOREACH_KEY_VAL_IND (pats , num_key , str_key , entry ) {
3512
3512
tmp_str = NULL ;
3513
3513
if (UNEXPECTED (!str_key )) {
3514
3514
str_key = tmp_str = zend_long_to_str (num_key );
@@ -4303,7 +4303,7 @@ static zend_long php_str_replace_in_subject(zval *search, zval *replace, zval *s
4303
4303
}
4304
4304
4305
4305
/* For each entry in the search array, get the entry */
4306
- ZEND_HASH_FOREACH_VAL (Z_ARRVAL_P (search ), search_entry ) {
4306
+ ZEND_HASH_FOREACH_VAL_IND (Z_ARRVAL_P (search ), search_entry ) {
4307
4307
/* Make sure we're dealing with strings. */
4308
4308
zend_string * tmp_search_str ;
4309
4309
zend_string * search_str = zval_get_tmp_string (search_entry , & tmp_search_str );
@@ -4463,7 +4463,7 @@ static void php_str_replace_common(INTERNAL_FUNCTION_PARAMETERS, int case_sensit
4463
4463
4464
4464
/* For each subject entry, convert it to string, then perform replacement
4465
4465
and add the result to the return_value array. */
4466
- ZEND_HASH_FOREACH_KEY_VAL (Z_ARRVAL_P (subject ), num_key , string_key , subject_entry ) {
4466
+ ZEND_HASH_FOREACH_KEY_VAL_IND (Z_ARRVAL_P (subject ), num_key , string_key , subject_entry ) {
4467
4467
ZVAL_DEREF (subject_entry );
4468
4468
if (Z_TYPE_P (subject_entry ) != IS_ARRAY && Z_TYPE_P (subject_entry ) != IS_OBJECT ) {
4469
4469
count += php_str_replace_in_subject (search , replace , subject_entry , & result , case_sensitivity );
0 commit comments