Re: [RFC] [Discussion] Add WHATWG compliant URL parsing API
| From: | Lynn | Date: | Fri, 28 Jun 2024 21:02:08 +0000 |
| Subject: | Re: [RFC] [Discussion] Add WHATWG compliant URL parsing API | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-124000@lists.php.net to get a copy of this message | ||
On Fri, Jun 28, 2024 at 10:08 PM Máté Kocsis <kocsismate90@gmail.com> wrote:
> Hi Everyone,
>
> I've been working on a new RFC for a while now, and time has come to
> present it to a wider audience.
>
> Last year, I learnt that PHP doesn't have built-in support for parsing
> URLs according to any well established standards (RFC 1738 or the WHATWG
> URL living standard), since the parse_url() function is optimized for
> performance instead of correctness.
>
> In order to improve compatibility with external tools consuming URLs (like
> browsers), my new RFC would add a WHATWG compliant URL parser functionality
> to the standard library. The API itself is not final by any means, the RFC
> only represents how I imagined it first.
>
> You can find the RFC at the following link:
> https://wiki.php.net/rfc/url_parsing_api
>
> Regards,
> Máté
>
>
This is a great addition to have! I see there's nothing specifically about
__toString in the RFC, is this aiming to do the same as PSR-7?