Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126910 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 74AA11A00BC for ; Sun, 23 Mar 2025 12:04:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1742731314; bh=wv1gFn3WcI5biS2a6Hw/YpK6Lp32DqsI2YEgwZ1inmM=; h=Date:From:To:Subject:In-Reply-To:References:From; b=cBqcXAsZs0gaztxWbeZ+3iJrDvXodqvmLbIcE7Uh8rMGS38NKK4b8mqS9Xyquf2Kf geX6BAm0sWAwhDBhsEDto5YmdJwBthe97SJn7s4lU1GRKrcBrU98purCp8Pn6b4s+c aFP6OuFphYDeTAGPGD3zpnBDN2tNyRlnLTZDE300mYLdNHbPKKIPhKqOChxWk7ruWK +c4VEzxTLPHG1L5K9VUMucjIZ+HBOenRWhfsOD1PJBISwqwi9jl4ndvIe5bn3QlxVe bR+NntuRuUbfomARvk07JP6E4TTIKalvx3NKBjpavZOhSGKAjAQhgMPYhNsAIkOCsZ KuguzQXoLBIgw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 64C67180083 for ; Sun, 23 Mar 2025 12:01:53 +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=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from fhigh-a5-smtp.messagingengine.com (fhigh-a5-smtp.messagingengine.com [103.168.172.156]) (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 ; Sun, 23 Mar 2025 12:01:43 +0000 (UTC) Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfhigh.phl.internal (Postfix) with ESMTP id 6B9DF1140141 for ; Sun, 23 Mar 2025 08:04:12 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-10.internal (MEProxy); Sun, 23 Mar 2025 08:04:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rwec.co.uk; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1742731452; x=1742817852; bh=lmTXd6ncLoEcPCzRIFkfsk4U0mO08E3YqJLSxaHRlIs=; b= SQijh92JKtiwJsiUU6FN87hft3Si/pKePJTFUXAKFDKiHxMpeLOlTkhXyI4BD6N7 mB0oQBAqfOBBbzX/MiYXhhRpEa3TBnzlxY8/qj8L0g1SVdIyKsyAjB4lWLtpT5dG rvP3NETtn+Ejevh/sg3kztlgKqRwEL0hUUoJLQPE1N3Y6VOs2+y68qLCezrhjFrY aauLgTgMBr61L0ElCRgTQWg5DUbf7S1L7fpfdW+LrQx0orz0djp7RPdvBhDzrd3k x2CDxp8b5KhyL2hIPPLyPuL0TJDCS5ORUwx8XuDQOELM9ZVoac5XIwJ46SZP+i0z eLOon5jriUYxzhnJIuWCag== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1742731452; x=1742817852; bh=l mTXd6ncLoEcPCzRIFkfsk4U0mO08E3YqJLSxaHRlIs=; b=cFoFG7lF4M1aKM6tI 0v7sxH2HJBySiOsasZiugCRrGf9TvKP2a0wizu3gV3SgVC4267gU5bZuDvPkhAOE W58CFEZAJ7ZHr0duTm+rNawZa9GYxaHX4vOF5RjGYuyO79NCg/jlMEV/BA3nCJgj spthgOdWQxTIt8heVNSnrwsOG91mroJp7cciEiXGz/Jjpcz+jthudgN7r7yy3k95 bJ3jui40sXmydC5cAR5GT7z9C+AkWOJQHgsvsen0tX6ymbEX+fAx1JW3wpT7jc0A PhPLMXXwvux+C3ktIcdJLrYipMLltRT6G2PmL7E9k/kDw7pmiRSbHtHrdkKKtT1G m8t8w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduheeikedvucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpeffhf fvufgfjghfkfggtgfgsehtqhhmtddtreejnecuhfhrohhmpedftfhofigrnhcuvfhomhhm ihhnshculgfkoffuohfrngdfuceoihhmshhophdrphhhphesrhifvggtrdgtohdruhhkqe enucggtffrrghtthgvrhhnpeehleffteeigfevudetfedugedtudevledugeeugeelheei hfehgfdtkeevvefgleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehimhhsohhprdhphhhpsehrfigvtgdrtghordhukhdpnhgspghrtghpthht ohepuddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepihhnthgvrhhnrghlsheslh hishhtshdrphhhphdrnhgvth X-ME-Proxy: Feedback-ID: id5114917:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sun, 23 Mar 2025 08:04:11 -0400 (EDT) Date: Sun, 23 Mar 2025 12:04:10 +0000 To: internals@lists.php.net Subject: Re: [PHP-DEV] Potential RFC: mb_rawurlencode() ? User-Agent: K-9 Mail for Android In-Reply-To: <4D8DD31A-E982-4D63-8671-2A35A886C609@pmjones.io> References: <36e83b76-6bab-42a3-9c5d-07a35d43851f@rwec.co.uk> <4D8DD31A-E982-4D63-8671-2A35A886C609@pmjones.io> Message-ID: <508C6326-89F9-4CCB-A3C7-4982850F5B39@rwec.co.uk> Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: imsop.php@rwec.co.uk ("Rowan Tommins [IMSoP]") On 22 March 2025 16:08:54 GMT, "Paul M=2E Jones" wr= ote: >Next up: what exactly should the API around this functionality look like?= I suggested functions but that's clearly a non-starter; what do we feel i= s a good alternative, and can it be achieved independently from (but in sup= port of) the URI+WHATWG-URL proposal? As I say, I haven't followed the previous conversation at all, but from a = glance at the RFC, it seems the proposed classes are called "Url"/"Uri", no= t "UrlParser"/"UriParser", so could maybe be expanded to creating *from* pa= rts=2E I don't know where exactly IRIs should fit in, but maybe as a new ob= ject in the same hierarchy? There's also definitely a place for standalone functions for handling spec= ific jobs on fragments of URIs=2E It would actually be really great to have= a replacement for parse_str which didn't carry the baggage of old PHP vers= ions - no by-reference output, no name mangling of keys (at least not by de= fault)=2E http_build_query isn't as urgently in need of replacement, but a = clean start could default the separator to '&' rather than pulling from an = INI setting=2E Whether each function should take an enum flag for encoding variants, or b= e split into a family of similar functions, I don't know=2E At the moment, = http_build_query accepts constants, (raw)urlencode is split into two functi= ons, and parse_str doesn't give any option=2E I don't want to have to memorise a bunch of RFC numbers in order to know w= hether spaces will be encoded as plus signs, but maybe we can find somethin= g more descriptive than "raw" to distinguish them=2E In short, I wouldn't start from the point of "how do we extend current fun= ctions to handle IRIs?", I'd start from the point of "what functions do we = need for handling URI/URL/IRI parts, and what variations of each?" Rowan Tommins [IMSoP]