Hi, 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 it might make sense to pass something else than CURLVERSION_NOW, but the PHP wrapper assumes that the return value of curl_version_info() matches the compile time declarations anyway, so passing anything else might give bad results.
Therefore I suggest to remove this parameter in the long run altogether. For PHP 7.4 I suggest to deprecate using the parameter, and also to ignore anything that is not CURLVERSION_NOW, and to raise a warning in this case. I.e. something like the following behavior: // okay curl_version(); // E_DEPRECATED: passing an argument is deprecated curl_version(CURLVERSION_NOW); // E_WARNING: argument ignored curl_version($not_curlversion_now); Thoughts? Do I overlook something important? [1] <https://www.php.net/manual/en/function.curl-version.php> [2] <https://curl.haxx.se/libcurl/c/curl_version_info.html> -- Christoph M. Becker -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php