Re: [RFC] [Discussion] Add WHATWG compliant URL parsing API

From: Date: Tue, 18 Mar 2025 17:00:55 +0000
Subject: Re: [RFC] [Discussion] Add WHATWG compliant URL parsing API
References: 1 2 3 4 5 6 7 8 9 10 11 12  Groups: php.internals 
Request: Send a blank email to internals+get-126827@lists.php.net to get a copy of this message
Hi Maté and all, There is a pre-existing userland implementation of WHATWG-URL at <https://github.com/TRowbotham/URL-Parser>. Packagist reports 600K+ downloads <https://packagist.org/packages/rowbot/url>. It is from Trevor Rowbotham, who is acknowledged in the WHATWG-URL specification itself <https://url.spec.whatwg.org/#acknowledgments>. (There is one alternative implementation, <https://packagist.org/packages/esperecyan/url> <https://github.com/esperecyan/url>, but it does not look as recent or robust.) If we want a full-featured WHATWG-URL implementation in core, would it not be preferable (with Trevor's permission) to convert rowbot/url from userland to core instead? Surely conversion from an existing, well-tested, widely-used implementation would be easier/better/faster than writing an implementation from scratch. -- pmj

« previous php.internals (#126827) next »