Re: [RFC] Enable strict_types checking for curl_setopt()

From: Date: Tue, 25 Apr 2017 15:56:57 +0000
Subject: Re: [RFC] Enable strict_types checking for curl_setopt()
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-98877@lists.php.net to get a copy of this message
On Mon, Apr 24, 2017 at 9:00 PM, Michał Brzuchalski <michal.brzuchalski@gmail.com> wrote: > I agree with Stanislav. IMHO argument types are valueable when are > reflective by reflection and curl_setopt has no valuable info by reflection > and will never be. Curl implementation also uses resources cURL handle is > used. > Literally zero internal functions have argument type reflection (beyond class and array types). curl_setopt() is not and would not be any different in this regard. https://3v4l.org/2BtPW > Maybe it's time to refactor and provide objects with option setters > with argument types? > I do agree there. I've got a WiP "cURLi" extention in my homedir that I've been poking at since ZendCon 2016. I suppose if we don't put type checking in curl_setopt() then that'll just push users who care about type safety towards cURLi. :D -Sara

« previous php.internals (#98877) next »