checks for `false`. The curl_share_close() function no longer has an effect,
instead the CurlShareHandle instance is automatically destroyed if it is no
longer referenced.
+ . The deprecated parameter `$version` of curl_version() has been removed.
- Enchant:
. The enchant extension now uses libenchant-2 by default when available.
function curl_strerror(int $error_number): ?string {}
-function curl_version(int $age = UNKNOWN): array|false {}
+function curl_version(): array|false {}
#define arginfo_curl_strerror arginfo_curl_multi_strerror
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_curl_version, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE)
- ZEND_ARG_TYPE_INFO(0, age, IS_LONG, 0)
ZEND_END_ARG_INFO()
}
/* }}} */
-/* {{{ proto array curl_version([int version])
+/* {{{ proto array curl_version()
Return cURL version information. */
PHP_FUNCTION(curl_version)
{
curl_version_info_data *d;
- zend_long uversion = -1;
- ZEND_PARSE_PARAMETERS_START(0, 1)
- Z_PARAM_OPTIONAL
- Z_PARAM_LONG(uversion)
- ZEND_PARSE_PARAMETERS_END();
-
- if (uversion == CURLVERSION_NOW) {
- php_error_docref(NULL, E_DEPRECATED, "The $version parameter is deprecated");
- } else if (ZEND_NUM_ARGS() > 0) {
- php_error_docref(NULL, E_WARNING, "$version argument ignored");
- }
+ ZEND_PARSE_PARAMETERS_NONE();
d = curl_version_info(CURLVERSION_NOW);
if (d == NULL) {
+++ /dev/null
---TEST--
-curl_version(): error conditions
---SKIPIF--
-<?php
-if (!extension_loaded('curl')) die('skip curl extension not available');
-?>
---FILE--
-<?php
-curl_version(CURLVERSION_NOW);
-curl_version(0);
-?>
---EXPECTF--
-Deprecated: curl_version(): The $version parameter is deprecated in %s on line %d
-
-Warning: curl_version(): $version argument ignored in %s on line %d