-#define http_curl_getopt(o, k, t) _http_curl_getopt((o), (k), (t) TSRMLS_CC)
-static inline zval *_http_curl_getopt(HashTable *options, char *key, int type TSRMLS_DC);
+#define http_curl_getopt(o, k, t) _http_curl_getopt_ex((o), (k), sizeof(k), (t) TSRMLS_CC)
+#define http_curl_getopt_ex(o, k, l, t) _http_curl_getopt_ex((o), (k), (l), (t) TSRMLS_CC)
+static inline zval *_http_curl_getopt_ex(HashTable *options, char *key, size_t keylen, int type TSRMLS_DC);