Re: Remove $age parameter of curl_version()

From: Date: Thu, 02 May 2019 17:00:00 +0000
Subject: Re: Remove $age parameter of curl_version()
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-105566@lists.php.net to get a copy of this message
On Thu, May 2, 2019 at 3:58 AM Christoph M. Becker <cmbecker69@gmx.de> wrote: > On 01.05.2019 at 19:40, Bishop Bettini wrote: > > > On Wed, May 1, 2019 at 1:18 PM Christoph M. Becker <cmbecker69@gmx.de> > > >> Thoughts? Do I overlook something important? > > > > Well, what about: > > > > if (false === curl_version(3)) { > > throw new \Exception('Please rebuild PHP with curl at least > > version 7.16.1'); > > } > > It seems to me that wouldn't work anyway, since curl_version() only > returns false if curl_version_info() returned NULL, but that won't > happen[2]. > > > [1]: > > https://github.com/php/php-src/blob/master/ext/curl/interface.c#L1824 > > [2] > < > > https://github.com/curl/curl/blob/d1b5cf830bfe169745721b21245d2217d2c2453e/lib/version.c#L390-L463 > > > Indeed. In that case, I cannot see any value from the $age parameter. It seems to be only an overly-literal functionality translation. I'm in favor of removal.

« previous php.internals (#105566) next »