Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105580 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 15090 invoked from network); 3 May 2019 13:42:08 -0000 Received: from unknown (HELO mout.gmx.net) (212.227.15.15) by pb1.pair.com with SMTP; 3 May 2019 13:42:08 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1556880300; bh=GvczwdS8s3loZnUPNnNLLeQyZRQ04rYLXkwmFGGH2PA=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=efBj655PQGpmYwG75ilutPaVN/fHbc17RhOWKrvx7sn+pIYdiIxGDrs8YbScO7Hfp m9cHdvtM8T+WoIa2vLBA1tSLBCtmBGw+HpiSM7cQTB34HpfLueKtybsGkwLBbO7A/K 7LDE8FwgfPAfZSlG6CRMlsPyTmZ1Dwk04YPxQtO0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.2.144] ([79.222.45.225]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mdeb5-1gnitp0AYT-00Zfzo for ; Fri, 03 May 2019 12:45:00 +0200 To: PHP internals References: Message-ID: <84fb3239-8415-9352-dd2c-c5362cb2befa@gmx.de> Date: Fri, 3 May 2019 12:44:59 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:597/xc0TcYvcr9Au2y3BWBDENLi9DBNL755OfN/yWreOjjng3iD EmHgl8e0qpTq5wvnAGV4UbgajIyBQfpz8tpV1GVsUlsCcaRXfGpGsIJl2aCDyBPOzoRln5O MwCFiLlgpSrz8CEi+x/G8Rk+wjH3/krH3rtjWEOdDf2YMgATKwPGg6EM7AaeOdcZ5WZeeQg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ameter of curl_version() From: cmbecker69@gmx.de ("Christoph M. Becker") On 01.05.2019 at 19:18, Christoph M. Becker wrote: > 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] > [2] I have submitted PR #4106[3] to address this issue. Of course, ignoring anything else than CURLVERSION_NOW would be a BC break, and is as such debatable. Also, the deprecation should be followed by an actual removal sometime in the future, so likely there should be a respective RFC -- or can we do without in this case? [3] =2D- Christoph M. Becker