Re: [RFC] [Under Discussion] New Curl URL API
| From: | Pierrick Charron | Date: | Wed, 22 Jun 2022 14:23:36 +0000 |
| Subject: | Re: [RFC] [Under Discussion] New Curl URL API | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-118047@lists.php.net to get a copy of this message | ||
Hi Derick,
>
> - The new CurlUrl class should probably be immutable from the start. It
> was my biggest mistake not to do that with DateTime.
>
>
Thanks for sharing your lessons learned. But I still see some use cases
where mutable objects are easier to use. From the experience you had with
DateTime, do you think that having
CurlUrl being immutable and providing
a MutableCurlUrl would make sense ? I see some cases where you "navigate"
on a website using the same CurlHandle and just want to manipulate the
MutableCurlUrl handle to change urls.
> - What happens if the curl library available on the system does not have
> the features and functions that this new class relies on? I would expect
> the class to not be available either, but the RFC does not mention that.
>
Good point. As you expected, if the functions are not available in libcurl,
the class will not be available. Same thing for each constant/feature. The
extension will "adapt" to the curl version. I will add this to the RFC.
Pierrick