Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126829 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id EA56D1A00BC for ; Tue, 18 Mar 2025 20:16:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1742328817; bh=Ovv/Z7JuB3vehMYAUV3uw+kQ/U7HefMvK7KaKvtDQC4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ZD+5vPUwMmGnrjNPme71KtxWYRKL1UdQ3GiarWnT7C6Nii2hI3KUyuBvdsor2hX81 HZuN3Rm88/VOZxypcs3Dc0em3RO9O3gSawCy4xbGdcDpe1jjmQyg8u/XL+bSBKIUVj YDwCkewKqx2YWzAZ5CXPdrrf31TijorMPxef5un4tBjz8v3EhodiloqgihYD7cjRY6 DqGz0fTo5n9juYGlg45neAW1YovCuehKW0N1u7tDfPwM9WmthkC2XBMyd3LwjPA6BP wqOdsLNWOW4F/co7rAvg5a9B0eHNhUqNHMjpwC6CCWl5cKuQ983gL51KOA+pscGSTf bb1C71D/C8sbg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 98756180082 for ; Tue, 18 Mar 2025 20:13:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.9 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-qt1-f182.google.com (mail-qt1-f182.google.com [209.85.160.182]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 18 Mar 2025 20:13:34 +0000 (UTC) Received: by mail-qt1-f182.google.com with SMTP id d75a77b69052e-476b4c9faa2so73993721cf.3 for ; Tue, 18 Mar 2025 13:16:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742328965; x=1742933765; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=mYB3vhcXM/G13ljrEXt3gnih7qF3SFb9B8DJv4FY454=; b=JsqcgTOocG0g/+V79/Nbg3Rej+GsTUMkWiToKqBZrpIq1vZOYxo8jHWn6pklh05Vro 5odgxs2s3cuDgTBLHMSI1CUItwNuJQJRjoXguJEhAc3RJGrlm6SbQ0U9jlhYNa7x7XZb DZ/a5Z/GOG4RvjQrYHSr4pGG3Ym1AuiPrq6KEHR2Ts0+TsGiecF+nxpHQi2d5xR7ew0Q HmCVYrzaQu/WGwq4Y+Lnkx8/MuS/VxdAiaTc0gmXqa3wxrqOAxPkfZzL1XJR178qlEqe WfFJSouhwxqBOJZ7dyHXHxfaCuBXGNQNkhPXQfr1P8PSRffPa6jZNPIj2NnybuJmzhE1 oCug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742328965; x=1742933765; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=mYB3vhcXM/G13ljrEXt3gnih7qF3SFb9B8DJv4FY454=; b=jlKX5ohF624PZrU53tjEbdMn4GyviE5gYFAdgb+5PWIqM39AE0AlXPOXMHigqaEyPa YOwSOhSgA5uB3Ci2pZ/o58ztF7ivZg36sY1S7rYON/NgSAg6hbAewOARqVFOfoh/wG6R k2ldBcA2VbZd8uxkguWKnVtTf1LeYF8libtriI1x3AsfVZHNHBMUZx0pIJ0bc8tRYXiQ wj9NzPQQWAoxe3Vxyeyvc9gdEL/b+DFNmZ1zrGIJyZWwjowX2UTat8uw2hYstHIke2mQ BCMx6SW+AQxLnWF7CJurb8bEES+ZT3Tk7y+rLObZaKWT5NZA04iT6AbkP7eFgQRwwh0E LUwg== X-Gm-Message-State: AOJu0YzMAAqPUiRiUFfuVA0L91TtAq9DfghU0HoIp+QU1wuqQILWFfGj D900CVp1V2TIJGa49KwH7XrF1hLAchS37KipFC6wCOOFz77GcohicUl6/yM6C9dYJ+ndP/KKuH0 MXPo+2SUR+s8xWzFJQNQyi8/8+B5h7WX5QIQ= X-Gm-Gg: ASbGnctBci5ZRNktqTj0fsZL+IrTC3GyPbFNwJK3uHuOFoPgtz5cHd9Tla2NaErBuQ/ ngikbbKfgMC2klakxTnF6+cOLWKBZAWejf6pUalPBxWQMxF+/rHefmnG+eGzfqil4h88B7XAL3S uhvJYVFljXOOiGqqD/TArH52po2VKHgbSVK8aA X-Google-Smtp-Source: AGHT+IELNvJ1Z0w1VNke53QQIIfJMq/SYOKXJb2IbDQ5CHY0Pv7aDqixW+kMp22bTAI5OPe2923v83mpSRYva+S/BY8= X-Received: by 2002:a05:622a:410e:b0:476:704d:9a49 with SMTP id d75a77b69052e-47708292384mr5330221cf.5.1742328964860; Tue, 18 Mar 2025 13:16:04 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: <1BCB4144-231D-45EA-A914-98EE8F0F503A@automattic.com> <8E614C9C-BA85-45D8-9A4E-A30D69981C5D@automattic.com> <9bf11a89-39d9-457b-b0ea-789fd07d7370@gmail.com> <6430b9ed-638d-4247-9fa9-d1a9148c382b@gmail.com> <1FD11284-D682-4CB7-893F-D74A1904610D@pmjones.io> In-Reply-To: <1FD11284-D682-4CB7-893F-D74A1904610D@pmjones.io> Date: Tue, 18 Mar 2025 21:15:52 +0100 X-Gm-Features: AQ5f1JrOqFNFgvsF_AusXaK-3IofpTeUyFu4RAru_nH-tXTcXao8GMYD1a_6_1s Message-ID: Subject: Re: [PHP-DEV] [RFC] [Discussion] Add WHATWG compliant URL parsing API To: "Paul M. Jones" Cc: PHP Internals List Content-Type: multipart/alternative; boundary="000000000000084fb80630a39314" From: kocsismate90@gmail.com (=?UTF-8?B?TcOhdMOpIEtvY3Npcw==?=) --000000000000084fb80630a39314 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Paul, > If we want a full-featured WHATWG-URL implementation in core, would it no= t > 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. > There's no way I would have written an implementation from scratch. I'm using the url module of the Lexbor C library ( https://github.com/lexbor/lexbor/) for handling WHATWG URLs. It's already bundled in core, and it's also battle tested, and it has exceptional maintenance. All I had to implement is the glue between userland and the C library. M=C3=A1t=C3=A9 --000000000000084fb80630a39314 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi P= aul,
=C2=A0
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 use= rland to core instead? Surely conversion from an existing, well-tested, wid= ely-used implementation would be easier/better/faster than writing an imple= mentation from scratch.

There= 's no way I would have written an implementation from scratch. I'm = using the url module of the Lexbor C library (https://gith= ub.com/lexbor/lexbor/) fo= r handling WHATWG URLs. It's already bundled in core, and it's als= o battle tested, and it has exceptional maintenance.=C2=A0All I had to implement is the glue between use= rland and the C library.

M=C3=A1t= =C3=A9
--000000000000084fb80630a39314--