Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98898 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74143 invoked from network); 28 Apr 2017 14:35:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Apr 2017 14:35:02 -0000 Authentication-Results: pb1.pair.com smtp.mail=markus@fischer.name; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=markus@fischer.name; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fischer.name from 84.116.36.14 cause and error) X-PHP-List-Original-Sender: markus@fischer.name X-Host-Fingerprint: 84.116.36.14 vie01a-dmta-pe06-1.mx.upcmail.net Received: from [84.116.36.14] ([84.116.36.14:29475] helo=vie01a-dmta-pe05-1.mx.upcmail.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2E/50-01540-41353095 for ; Fri, 28 Apr 2017 10:35:01 -0400 Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe06.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1d46z2-0008RZ-OQ for internals@lists.php.net; Fri, 28 Apr 2017 16:34:56 +0200 Received: from mail02.home ([213.47.8.56]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id Dqao1v00l1CY7x901qapmL; Fri, 28 Apr 2017 16:34:49 +0200 X-SourceIP: 213.47.8.56 Received: from mail02.home ([192.168.1.14] helo=[IPv6:::1]) by mail02.home with esmtp (Exim 4.72) (envelope-from ) id 1d46ys-0004OW-Tm for internals@lists.php.net; Fri, 28 Apr 2017 16:34:48 +0200 To: internals@lists.php.net References: Message-ID: Date: Fri, 28 Apr 2017 16:34:46 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- X-Spam_report: Spam detection software, running on the system "scanner01.home", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi, On 22.04.17 13:40, Colin O'Dell wrote: > Hello internals, > > 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. [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: php.net] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Subject: Re: [PHP-DEV] [RFC] Enable strict_types checking for curl_setopt() From: markus@fischer.name (Markus Fischer) Hi, On 22.04.17 13:40, Colin O'Dell wrote: > Hello internals, > > 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. I'm sorry to say but I think this /approach/ is a horrible idea :( To me the intention of strict types is clearly on the functions publicly visible contract, i.e. it's reflectable parameters and not some business logic hidden inside a function. regards, - Markus