- zend_hash_clean(OBJ_PROP(obj));
-
- ASSOC_PROP(obj, long, "type", msg->type);
- ASSOC_STRINGL(obj, "body", PHPSTR_VAL(msg), PHPSTR_LEN(msg));
-
- MAKE_STD_ZVAL(headers);
- array_init(headers);
-
- zend_hash_copy(Z_ARRVAL_P(headers), &msg->hdrs, (copy_ctor_func_t) zval_add_ref, NULL, sizeof(zval *));
- ASSOC_PROP(obj, zval, "headers", headers);
+ ASSOC_PROP(array, long, "type", msg->type);
+ ASSOC_PROP(array, double, "httpVersion", msg->http.version);