/* }}} */
/* {{{ proto array array_combine(array keys, array values)
- Creates an array by using the elements of the first parameter as keys and the elements of the second as corresponding keys */
+ Creates an array by using the elements of the first parameter as keys and the elements of the second as the corresponding keys */
PHP_FUNCTION(array_combine)
{
zval *values, *keys;
zend_hash_get_current_data_ex(Z_ARRVAL_P(values), (void **)&entry_values, &pos_values) == SUCCESS) {
if (Z_TYPE_PP(entry_keys) == IS_STRING) {
zval_add_ref(entry_values);
- add_assoc_zval(return_value, Z_STRVAL_PP(entry_keys), *entry_values);
+ add_assoc_zval_ex(return_value, Z_STRVAL_PP(entry_keys), Z_STRLEN_PP(entry_keys), *entry_values);
} else if (Z_TYPE_PP(entry_keys) == IS_LONG) {
zval_add_ref(entry_values);
add_index_zval(return_value, Z_LVAL_PP(entry_keys), *entry_values);