Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126516 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 8451A1A00D5 for ; Thu, 27 Feb 2025 13:48:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1740663943; bh=MJ091xKJBt40G+Iu4O+q5Iy/Q29TQJayVP0wgAIKCOY=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=ePcAAOzn79Tw8sWd3LHfrAv/5B56rPMKd8FW2FtvXEwi4i0LUC4DkjWHtjFwegtcH CtrViOWjxgb/OQYEnKAOgA7xCYkCCdLhEdP4gppNmT6nj9I5PVGUn+XhqSVhOznf6r t+o1VKZ5cqG6t1NcsHX8lLREb3uJWUH8wYNiPfyFebhD4fY5J5AXodNXgs1YkbYJE9 8rNcnEAEhuybSPmjeEYlWvyyM8F0aaovm528jFGsg3RCqPhpbGr9drAWXSwVAqli3t oJSwg44l4sM+MbMuD/TKDV1D6ZNYlA1ZnFaswg4NsdbOwvJSlEJpHkV3RpjTeSaKsy XrK9FtAphT4hg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 6A49D180381 for ; Thu, 27 Feb 2025 13:45:41 +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.7 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from premium76-5.web-hosting.com (premium76-5.web-hosting.com [162.213.255.108]) (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 ; Thu, 27 Feb 2025 13:45:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=pmjones.io; s=default; h=To:References:Message-Id:Content-Transfer-Encoding:Cc:Date: In-Reply-To:From:Subject:Mime-Version:Content-Type:Sender:Reply-To:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe :List-Post:List-Owner:List-Archive; bh=MJ091xKJBt40G+Iu4O+q5Iy/Q29TQJayVP0wgAIKCOY=; b=tioqC/iOlBHKLTNVii50P0guny Kv9ucWd9aRZ2Ube3nLNGCmKtA09Nusrrgm9FAVsMELl+jR5WYhbyD2vRvCRUMOX2CG2rNFYYuVAUb uXA8upGlGZ8MxD/GZX/L6Rnx+CfuTsxx2Wje7RCOd3alJf6JvCnL5qXeftc5DjyENwyTgB5c50TGw CLd/kZzylDgAQR+SUiGyzuakCjQdvMG3ephX1fd6tUw2TRFTp5ZLloqpaH3iOZ6o+WE9ceOhkRBKz ZNerC3EaH8T4Ifj58UYf8Pij12AXi5fYCfygXQy9ngY8Ia7iKGkIMJaDnwteivuvexT0QcwIF5VXB 71STy0Jg==; Received: from 107-223-28-39.lightspeed.nsvltn.sbcglobal.net ([107.223.28.39]:64141 helo=smtpclient.apple) by premium76.web-hosting.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.1) (envelope-from ) id 1tneFK-00000003eQb-1ynj; Thu, 27 Feb 2025 08:48:14 -0500 Content-Type: text/plain; charset=utf-8 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.400.131.1.6\)) Subject: Re: [PHP-DEV] [RFC] [Discussion] Add WHATWG compliant URL parsing API In-Reply-To: Date: Thu, 27 Feb 2025 07:48:02 -0600 Cc: =?utf-8?Q?Tim_D=C3=BCsterhus?= , "Gina P. Banyard" , PHP Internals List Content-Transfer-Encoding: quoted-printable Message-ID: <7B7987C6-37F3-432A-8BA2-9D93F428FAD5@pmjones.io> References: <811B65CE-1DF0-4A47-937C-4FCB6E945B92@pmjones.io> <19377F60-FB7F-4E6E-A085-4DCB6CD92234@pmjones.io> To: nyamsprod@gmail.com X-Mailer: Apple Mail (2.3826.400.131.1.6) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - premium76.web-hosting.com X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - pmjones.io X-Get-Message-Sender-Via: premium76.web-hosting.com: authenticated_id: pmjones@pmjones.io X-Authenticated-Sender: premium76.web-hosting.com: pmjones@pmjones.io X-Source: X-Source-Args: X-Source-Dir: X-From-Rewrite: unmodified, already matched From: pmjones@pmjones.io ("Paul M. Jones") > On Feb 25, 2025, at 09:55, ignace nyamagana butera = wrote: >=20 > The problem with your suggestion is that the specification from WHATWG = and RFC3986/3987 are so different and that the function you are = proposing won't be able to cover the outcome correctly (ie give the = developper all the needed information). This is why, for instance, Mat=C3=A9= added the getRaw* method alongside the normalized getter (method = without the Raw prefix). The two functions need not return an identical array of components; = e.g., the 3986 parsing function might return an array much like = parse_url() does now, and the WHATWG function might return a completely = different array of components (one that includes the normalized and/or = raw components). All of this is to say that the parsing functionality does not have to be = in an object to be useful *both* to the internal API *and* to userland. Recall that I'm responding at least in part to the comment that = "Considering that one of the other stated goals of this RFC is to = provide this API to other core extensions, the previous objections [to = the Request/Response objects going into core] do not apply here." If the = only reason they don't apply is that the core extensions need a parsing = API, that reason becomes obviated by using just functions for the = parsing elements. Unless I'm missing something; happy to hear what that might be. -- pmj