summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/curl/curl.c11
-rw-r--r--ext/curl/php_curl.h3
2 files changed, 12 insertions, 2 deletions
diff --git a/ext/curl/curl.c b/ext/curl/curl.c
index a29a9f07fc..4c8af7a481 100644
--- a/ext/curl/curl.c
+++ b/ext/curl/curl.c
@@ -37,6 +37,7 @@ php_curl_globals curl_globals;
function_entry curl_functions[] = {
PHP_FE (curl_init, NULL)
+ PHP_FE (curl_version, NULL)
PHP_FE (curl_setopt, NULL)
PHP_FE (curl_exec, NULL)
PHP_FE (curl_close, NULL)
@@ -122,6 +123,14 @@ PHP_MINIT_FUNCTION(curl)
return SUCCESS;
}
+/* {{{ proto string curl_version ()
+ Return the CURL version string. */
+PHP_FUNCTION (curl_version)
+{
+ RETURN_STRING(curl_version(),1);
+}
+/* }}} */
+
/* {{{ proto int curl_init ([string url])
Initialize a CURL session */
PHP_FUNCTION (curl_init)
@@ -260,4 +269,4 @@ PHP_FUNCTION (curl_close)
}
/* }}} */
-#endif \ No newline at end of file
+#endif
diff --git a/ext/curl/php_curl.h b/ext/curl/php_curl.h
index b5c6e51dd4..0f82b27bc5 100644
--- a/ext/curl/php_curl.h
+++ b/ext/curl/php_curl.h
@@ -33,6 +33,7 @@ extern zend_module_entry curl_module_entry;
PHP_MINIT_FUNCTION (curl);
PHP_MINFO_FUNCTION (curl);
+PHP_FUNCTION (curl_version);
PHP_FUNCTION (curl_init);
PHP_FUNCTION (curl_setopt);
PHP_FUNCTION (curl_exec);
@@ -56,4 +57,4 @@ typedef struct {
#define curl_module_ptr NULL
#endif /* HAVE_CURL */
#define phpext_curl_ptr curl_module_ptr
-#endif /* _PHP_CURL_H */ \ No newline at end of file
+#endif /* _PHP_CURL_H */