@@ -6011,7 +6011,6 @@ PHP_FUNCTION(array_reduce)
6011
6011
zval * input ;
6012
6012
zval args [2 ];
6013
6013
zval * operand ;
6014
- zval result ;
6015
6014
zval retval ;
6016
6015
zend_fcall_info fci ;
6017
6016
zend_fcall_info_cache fci_cache = empty_fcall_info_cache ;
@@ -6027,9 +6026,9 @@ PHP_FUNCTION(array_reduce)
6027
6026
6028
6027
6029
6028
if (ZEND_NUM_ARGS () > 2 ) {
6030
- ZVAL_COPY (& result , initial );
6029
+ ZVAL_COPY (return_value , initial );
6031
6030
} else {
6032
- ZVAL_NULL (& result );
6031
+ ZVAL_NULL (return_value );
6033
6032
}
6034
6033
6035
6034
/* (zval **)input points to an element of argument stack
@@ -6038,7 +6037,6 @@ PHP_FUNCTION(array_reduce)
6038
6037
htbl = Z_ARRVAL_P (input );
6039
6038
6040
6039
if (zend_hash_num_elements (htbl ) == 0 ) {
6041
- ZVAL_COPY_VALUE (return_value , & result );
6042
6040
zend_release_fcall_info_cache (& fci_cache );
6043
6041
return ;
6044
6042
}
@@ -6048,14 +6046,14 @@ PHP_FUNCTION(array_reduce)
6048
6046
fci .no_separation = 0 ;
6049
6047
6050
6048
ZEND_HASH_FOREACH_VAL (htbl , operand ) {
6051
- ZVAL_COPY_VALUE (& args [0 ], & result );
6049
+ ZVAL_COPY_VALUE (& args [0 ], return_value );
6052
6050
ZVAL_COPY (& args [1 ], operand );
6053
6051
fci .params = args ;
6054
6052
6055
6053
if (zend_call_function (& fci , & fci_cache ) == SUCCESS && Z_TYPE (retval ) != IS_UNDEF ) {
6056
6054
zval_ptr_dtor (& args [1 ]);
6057
6055
zval_ptr_dtor (& args [0 ]);
6058
- ZVAL_COPY_VALUE (& result , & retval );
6056
+ ZVAL_COPY_VALUE (return_value , & retval );
6059
6057
} else {
6060
6058
zval_ptr_dtor (& args [1 ]);
6061
6059
zval_ptr_dtor (& args [0 ]);
@@ -6064,7 +6062,6 @@ PHP_FUNCTION(array_reduce)
6064
6062
} ZEND_HASH_FOREACH_END ();
6065
6063
6066
6064
zend_release_fcall_info_cache (& fci_cache );
6067
- RETURN_COPY_VALUE (& result );
6068
6065
}
6069
6066
/* }}} */
6070
6067
0 commit comments