#endif
#if PHP_HTTP_CURL_VERSION(7,21,0)
if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_LOCAL_PORT, &l)) {
- add_assoc_long_ex(&array, "local_port", sizeof("local_port"), l);
+ ZVAL_LONG(&tmp, l);
+ zend_hash_str_update(info, "local_port", lenof("local_port"), &tmp);
}
#endif
- add_assoc_long_ex(&array, "http_version", sizeof("http_version"), l);
+ #if PHP_HTTP_CURL_VERSION(7,50,0)
+ if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_HTTP_VERSION, &l)) {
++ ZVAL_LONG(&tmp, l);
++ zend_hash_str_update(info, "http_version", lenof("http_version"), &tmp);
+ }
+ #endif
/* END::CURLINFO */