Re: Discussion about new Curl URL API and ext/curl improvements

From: Date: Fri, 17 Jun 2022 10:18:42 +0000
Subject: Re: Discussion about new Curl URL API and ext/curl improvements
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-117973@lists.php.net to get a copy of this message
On 17 Jun 2022, at 09:27, Lynn <kjarli@gmail.com> wrote: > ... That said, we should avoid having: cURL procedural + cURL procedural in objects + cURL OOP. > Having 2 different object based libraries to do the same thing PHP is confusing and will just end up > in way too many Stack Overflow questions. > > Perhaps it is best to split this into 2 separate RFCs? tbh, I'd worry the OOP version would need a fair amount of discussion, and experimentation... e.g. what the methods/parameters should be, deciding how errors/oddities are handled (where exceptions should be used, can NULL be returned (aka the 9.0 grenade), or other fancy approaches like monads?), and how curl_multi_* functionality would work. Could the OOP work be done separately, maybe starting in userland, so those decisions could be made... and in the mean time, ext/curl gets a quick update to expose this new URL API in the procedural style (keeping consistency, and keeping it as a thin wrapper for now)? Craig

« previous php.internals (#117973) next »