- FOREACH_HASH_VAL(pos, supported, value_ptr) { \
- zval *value = php_http_ztyp(IS_STRING, *value_ptr); \
- add_assoc_double(rs_array, Z_STRVAL_P(value), 1.0); \
- zval_ptr_dtor(&value); \
+ ZEND_HASH_FOREACH_VAL(supported, value) \
+ { \
+ zend_string *zs = zval_get_string(value); \
+ add_assoc_double_ex(rs_array, zs->val, zs->len, 1.0); \
+ zend_string_release(zs); \