Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105550 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 62187 invoked from network); 1 May 2019 22:05:00 -0000 Received: from unknown (HELO mail-lj1-f178.google.com) (209.85.208.178) by pb1.pair.com with SMTP; 1 May 2019 22:05:00 -0000 Received: by mail-lj1-f178.google.com with SMTP id z26so18405ljj.2 for ; Wed, 01 May 2019 12:07:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1pNO1x9BSKvJ++wr6B4WEicQIBZ1sXPJ8Dil/RndRhg=; b=gAZyhFWcWBg65+oImfTGsYgdvOLyw8UeQp0a/VvPynEDzvbyVkUuuwmROw7yUfSv9u Kg+/dfKjfVYVAU1GRlnWyXbsPHZiK/QNKYFMHUAXX8sWAPlfYLiiQm9cQ7EhqSpAaLxO JIJAgsflURF4xCN/bXtpEIsbutWokYvsD/RaIFg+1qYdJvkgrv9Qod/5I5d6YltyPVL1 VDrdqJ7DcsjW8wFw7iWc36EB1I3T450daKDtvwoRCWTVyhtLUUg18cGvSDPSDrPilXNx ITzpzhQsYp41kh7L7BJ5wGoDftTy4tLf8VJ9C3QXnql/4eInyAcrGm9IAoVOO6PFzOI+ F8iA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1pNO1x9BSKvJ++wr6B4WEicQIBZ1sXPJ8Dil/RndRhg=; b=rqaCuLk1gx0E170B1QrX1J43t9bbIzDWGHn42kVmOByBBR4ZQvX3nxrjXD78YvO5Nq d331Da6JSQJZmQSU24FsuWJzx86CiQeA9LJEeS25xtpHby8mTiKQtaJRO5G5DtRdn10F JTFdETUAe0MO3M7WGa6YzjnWWuvmY5B2y17x1/V+KopRmL7TvvuNnAqIXm1ZRKTx/fqU VQv7TLWUYHO27qJPYIrorq/ncxPUrzy8uW13ZqGBL7sspW9v/0pbDwzOWuTiLdeUeO5B GjekZ7QxlM0zGtCkwxJcCfMDFuM9wBwemYpLJov1f5sCU966tq6cp2GmDIiwjpk871Kf wrvg== X-Gm-Message-State: APjAAAW9AceJbiaSUU+aH3Rzf5wutZKe2Z3Uaf45TkaoAKZkZ/DgsdNM P1l447udaQFCQ+ssvsWRTHx5qNtLcbBZ83BMYpE= X-Google-Smtp-Source: APXvYqzDQ4zcJPVtslDKo8Z9caz4X3ZsRGvgmgk+3acb6dY29polmUWsFL0ephc2Oct27NHROc4M3qhgBa42KxuFGnQ= X-Received: by 2002:a2e:6e0b:: with SMTP id j11mr14457850ljc.46.1556737647160; Wed, 01 May 2019 12:07:27 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 1 May 2019 21:07:10 +0200 Message-ID: To: "Christoph M. Becker" Cc: PHP internals Content-Type: multipart/alternative; boundary="00000000000077b59d0587d83afe" Subject: Re: [PHP-DEV] Remove $age parameter of curl_version() From: nikita.ppv@gmail.com (Nikita Popov) --00000000000077b59d0587d83afe Content-Type: text/plain; charset="UTF-8" On Wed, May 1, 2019 at 7:19 PM Christoph M. Becker wrote: > 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? > Sounds good to me. Nikita --00000000000077b59d0587d83afe--