Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98848 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33695 invoked from network); 22 Apr 2017 18:10:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Apr 2017 18:10:56 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@golemon.com; spf=softfail; sender-id=softfail Authentication-Results: pb1.pair.com header.from=php@golemon.com; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain golemon.com does not designate 209.85.128.173 as permitted sender) X-PHP-List-Original-Sender: php@golemon.com X-Host-Fingerprint: 209.85.128.173 mail-wr0-f173.google.com Received: from [209.85.128.173] ([209.85.128.173:33005] helo=mail-wr0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C1/B4-65481-EAC9BF85 for ; Sat, 22 Apr 2017 14:10:55 -0400 Received: by mail-wr0-f173.google.com with SMTP id w50so46994168wrc.0 for ; Sat, 22 Apr 2017 11:10:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=golemon-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=AypbFcldwocG+M+EYKkWSRr0/cYueZDvFeEtS0lGbwE=; b=Xq+hSZil3MEsTB2fdm/bHWDQn8/N/0mjDelUBr+doIrAYm3AUcxtNWzdFELA1c7R11 bfnM8eWUHBhRx1F7fZ6sYlqDsi863lrB70QFOSBdgzBWSOkOmaaB41bozoTQEmAxr8q0 SIVi7/a/tvWIhUwi1j+FUUcy1WspaDjq1/hiJf58vOYchlsadkdlOJedef2b+EsUGJE2 jswbXRssoBsLUyAGUZzV7sz/GBG9jZ7m/RvsEpUon1Rc4VQPdYIXCjldYWt5ZDtiwYXn 8xfshxc+2IsRze1Lvj75p7yAqM+td9S9WblnWGpwhWAu4dXw72HC2LQ4Soo6/lNfeO3n 4Ktg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=AypbFcldwocG+M+EYKkWSRr0/cYueZDvFeEtS0lGbwE=; b=FcelPCipu735q79e9OeqZC17wcqLivAO4mN2Ko4q48yqSz0/cwRt1dpe6hEIrR8BrD n5sy35iYj1UKlpOj6hVhX5C8Em49mISfbU8HRlEMhoRACXy8PMFl2ZtBym5tXhjo5FRK 0XYGRMZaEabxmMcxZgx9mh8XBZHr8PTMIII0G6NunxKoJYu0N4pH5QXWEWRM0X6IY4hl M+0o9/rrM2/9gKd9WZYMB68TG1EAfuvUkMs3MEjJCwnc067rOrXa3C1faaNGXp15REXr 3EWp2XceGoHUMQuuQf6t41L89iePB41pB0btXp/Q9HX5qX7y1jzGfQEdvKuaax5lnqZ+ Nsgg== X-Gm-Message-State: AN3rC/4pq9IUa5/FS/w0ydNBkYJ3wa+iy4MPtcL1GOcaSQ5k5Ji/Tl3P mr26hK5enRUW7Pd/zgz/9G1+brjxJQ== X-Received: by 10.223.173.74 with SMTP id p68mr424429wrc.163.1492884651637; Sat, 22 Apr 2017 11:10:51 -0700 (PDT) MIME-Version: 1.0 Sender: php@golemon.com Received: by 10.223.157.12 with HTTP; Sat, 22 Apr 2017 11:10:50 -0700 (PDT) X-Originating-IP: [50.197.186.161] In-Reply-To: References: Date: Sat, 22 Apr 2017 11:10:50 -0700 X-Google-Sender-Auth: zqDbpDWuVnEZAOLNgN3v1OosbNE Message-ID: To: "Colin O'Dell" Cc: PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] Enable strict_types checking for curl_setopt() From: pollita@php.net (Sara Golemon) On Sat, Apr 22, 2017 at 4:40 AM, Colin O'Dell wrote: > I'd like to propose an enhancement to curl_setopt() > which is used to > configure a given curl session. The second argument of this function > defines which option to set and the third argument provides the > corresponding value to use. > > Because each option expects the value to be a specific type, it makes sense > to enforce these types in strict type checking mode. I'd therefore like to > propose that we introduce strict type enforcement inside curl_setopt() when > "declare(strict_types=1);" is being used. > > The full details of the proposal, including the proposed patch, can be > found here: https://wiki.php.net/rfc/curl_setopt_strict_types > A note on the current state of the PR: Colin's RFC is based on the first commit in that PR, but after more thought and some feedback from NikiC, I piled a refactor on top of it which quite notably changes the weak-mode handling. See https://github.com/php/php-src/pull/2495#issuecomment-296383366 So some decisions to make yet regarding precisely *how* we'd land the final commit, but I hope we can all agree the intent stated in the RFC is pretty sound: Improve type checking in curl_setopt() without screwing over the majority of existing users. -Sara