zval *input;
zval args[2];
zval *operand;
- zval result;
zval retval;
zend_fcall_info fci;
zend_fcall_info_cache fci_cache = empty_fcall_info_cache;
if (ZEND_NUM_ARGS() > 2) {
- ZVAL_COPY(&result, initial);
+ ZVAL_COPY(return_value, initial);
} else {
- ZVAL_NULL(&result);
+ ZVAL_NULL(return_value);
}
/* (zval **)input points to an element of argument stack
htbl = Z_ARRVAL_P(input);
if (zend_hash_num_elements(htbl) == 0) {
- ZVAL_COPY_VALUE(return_value, &result);
zend_release_fcall_info_cache(&fci_cache);
return;
}
fci.no_separation = 0;
ZEND_HASH_FOREACH_VAL(htbl, operand) {
- ZVAL_COPY_VALUE(&args[0], &result);
+ ZVAL_COPY_VALUE(&args[0], return_value);
ZVAL_COPY(&args[1], operand);
fci.params = args;
if (zend_call_function(&fci, &fci_cache) == SUCCESS && Z_TYPE(retval) != IS_UNDEF) {
zval_ptr_dtor(&args[1]);
zval_ptr_dtor(&args[0]);
- ZVAL_COPY_VALUE(&result, &retval);
+ ZVAL_COPY_VALUE(return_value, &retval);
} else {
zval_ptr_dtor(&args[1]);
zval_ptr_dtor(&args[0]);
} ZEND_HASH_FOREACH_END();
zend_release_fcall_info_cache(&fci_cache);
- RETURN_COPY_VALUE(&result);
}
/* }}} */