On Sat, Apr 22, 2017 at 4:40 AM, Colin O'Dell <colinod...@gmail.com> wrote:
> I'd like to propose an enhancement to curl_setopt()
> <http://php.net/manual/en/function.curl-setopt.php> 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

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to