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

From: Date: Tue, 25 Apr 2017 16:37:41 +0000
Subject: Re: [RFC] Enable strict_types checking for curl_setopt()
References: 1 2 3 4 5 6 7 8  Groups: php.internals 
Request: Send a blank email to internals+get-98878@lists.php.net to get a copy of this message
On 25 April 2017 16:56:57 BST, Sara Golemon <pollita@php.net> wrote: >> 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 Oh, lordy, yes please! The curl API is absolutely horrible, and just crying out for a more sane wrapper to be built into the language, rather than everyone writing their own messy classes. Please can we also set some sane defaults (e.g. CURLOPT_RETURNTRANSFER) and a small amount of extra logic (e.g. capturing return headers) so that using it doesn't require a dozen lines of boilerplate to be useful? Thanks, -- Rowan Collins [IMSoP]

« previous php.internals (#98878) next »