History log of /PHP-7.4/ext/curl/tests/curl_version_error_001.phpt (Results 1 – 1 of 1)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: php-7.3.13RC1, php-7.2.26RC1, php-7.4.0, php-7.2.25, php-7.3.12, php-7.4.0RC6, php-7.3.12RC1, php-7.2.25RC1, php-7.4.0RC5, php-7.1.33, php-7.2.24, php-7.3.11, php-7.4.0RC4, php-7.3.11RC1, php-7.2.24RC1, php-7.4.0RC3, php-7.2.23, php-7.3.10, php-7.4.0RC2, php-7.2.23RC1, php-7.3.10RC1, php-7.4.0RC1, php-7.1.32, php-7.2.22, php-7.3.9, php-7.4.0beta4, php-7.2.22RC1, php-7.3.9RC1, php-7.4.0beta2, php-7.1.31, php-7.2.21, php-7.3.8, php-7.4.0beta1, php-7.2.21RC1, php-7.3.8RC1, php-7.4.0alpha3, php-7.3.7, php-7.2.20, php-7.4.0alpha2, php-7.3.7RC3, php-7.3.7RC2, php-7.2.20RC2, php-7.4.0alpha1, php-7.3.7RC1, php-7.2.20RC1, php-7.2.19, php-7.3.6, php-7.1.30, php-7.2.19RC1, php-7.3.6RC1
# 357da6bc 13-May-2019 Christoph M. Becker

Deprecate and ignore $version parameter of curl_version()

`curl_version()`[1] (of ext/curl) makes `curl_version_info()`[2] (of
libcurl) available to PHP userland. The latter requires to

Deprecate and ignore $version parameter of curl_version()

`curl_version()`[1] (of ext/curl) makes `curl_version_info()`[2] (of
libcurl) available to PHP userland. The latter requires to pass an
`age` argument which usually is `CURLVERSION_NOW`, so that the
information returned by the runtime matches the declarations used
during compile time. For C programs it is simply necessary to pass
this information, and in rare occasions it might make sense to pass
something else than `CURLVERSION_NOW`. curl.h notes:

| The 'CURLVERSION_NOW' is the symbolic name meant to be used by
| basically all programs ever that want to get version information.

For the PHP binding, using a newer `age` than available at compile time
will neither provide the PHP program more information, nor would using
an older `age` have tangible benefits.

We therefore deprecate the useless `$version` parameter, and if it is
passed nonetheless, we use `CURLVERSION_NOW` instead of the supplied
value, and raise a warning.

[1] <https://www.php.net/manual/en/function.curl-version.php>
[2] <https://curl.haxx.se/libcurl/c/curl_version_info.html>

show more ...