-/* {{{ static inline zval *http_curl_getopt(HashTable *, char *, int, ...) */
-static inline zval *_http_curl_getopt(HashTable *options, char *key TSRMLS_DC, int checks, ...)
+static int http_curl_debug_callback(CURL *ch, curl_infotype type, char *string, size_t length, void *data)
+{
+ zval *params_pass[2], params_local[2], retval, *func = (zval *) data;
+ TSRMLS_FETCH();
+
+ params_pass[0] = ¶ms_local[0];
+ params_pass[1] = ¶ms_local[1];
+
+ ZVAL_LONG(params_pass[0], type);
+ ZVAL_STRINGL(params_pass[1], string, length, 1);
+
+ call_user_function(EG(function_table), NULL, func, &retval, 2, params_pass TSRMLS_CC);
+
+ return 0;
+}
+/* {{{ static inline zval *http_curl_getopt(HashTable *, char *, size_t, int) */
+static inline zval *_http_curl_getopt_ex(HashTable *options, char *key, size_t keylen, int type TSRMLS_DC)