Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126945 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 46EAF1A00BE for ; Tue, 25 Mar 2025 22:23:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1742941250; bh=1L1ExT2e0vAQbj9T0QoxDSGieablADMq+2Q6BffziFs=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=kQ4bdU40IWVaX8CzvxahsTc0WyjOyZ1WQlGG0O2b7nFjc1E3aSbG/gg8pqydyEi+n kL5+YAnvX6c6BWsPGCigiZixJF7+KUwtPDRFBoRtudtCEvyWTR5nvqBaa8GYIbQHxn chAdYjQ5cMoAWuqEzgxKricwy6sRkimWMaH9LXTGP6mJYuUAGZMkS9s+UUKcwdZyil HByaq/ZdacBbwsNf1rX/GQ9mDgk2FctcE9nonPNXdU38IHfSckE5pITSG+VKYEcNiR WgFQyYMA6Vl75dVBAup4Jl1JwYTw0r+ksikT+P1/K8nfgbdhXtF8wUfDJQoatd+ura rsjigMreVGufQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 14FE01804AA for ; Tue, 25 Mar 2025 22:20:49 +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=-1.7 required=5.0 tests=BAYES_40,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_H2,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-f176.google.com (mail-qt1-f176.google.com [209.85.160.176]) (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, 25 Mar 2025 22:20:46 +0000 (UTC) Received: by mail-qt1-f176.google.com with SMTP id d75a77b69052e-47690a4ec97so63243241cf.2 for ; Tue, 25 Mar 2025 15:23:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742941395; x=1743546195; 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=1L1ExT2e0vAQbj9T0QoxDSGieablADMq+2Q6BffziFs=; b=WYwr8TLVZF0/uBPNpCCNX4fXqVeMdOA6VVx9+H+ZOHvutki90t6Yoh7REaYzYqVzkG 5Y835zj57oNVS2NC++NuFJxjgHtFE2rCWCW5lBooxUJgnMvvyC7fDOrR6iWILH0PDYvH fcvPyUhKdKe8n5T8dEVKHgAKtdQxE1Qn+AgJSptC00Vrlb6qIgAqsrCojYFgvmMoKEa8 U9J6raILshG5AKb6oaYqwnlnauVjeqXMrFuUklAvKMr1URmdL0JbkJuyFSTkwThKtCIH VZxIGmaYHU4vLOlJEgbubof4Dyd2PDw6R+nCmwWbLwujFTGLHEvr3l1rlBfgYN//78m+ 32Kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742941395; x=1743546195; 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=1L1ExT2e0vAQbj9T0QoxDSGieablADMq+2Q6BffziFs=; b=hCvQzjaJn90R596O71gQvx2NH5RD1qKyN9/bf1AvKRDujR7e6c8q3HTr1xs9A+5Ycq FwOogPndS+N9tHv4m4ZC8O49OV/433yR9KqWb2ywGUUa5YVrrfkoB06I/BvyFc8hqwua kVoywAiqsn6/One9vblAGjOdUzR4pqLJSiD4Fvb+s/3xP1m/nIvPHNxpDBUIoGAKQQL2 1VeDadFryaLlfM6dhCqtBkagUjcxmuYmaFXMDZAoj/HlhKLDMxYhh7ihPupwT9AZiL4N OFq3TvzzQSYKU8b5XHqKZgC+V/72hEclih3lI0IeVrMIV6JJLTPSy2KBXI46IJKebq2F A/ug== X-Gm-Message-State: AOJu0Yw0iUuZ0hIVOEGX/o4lDmndGltUzUy/fVh7z2PZ+vCERPihPEXN HqPKH28YEObQnMseoeGcNeN1F9yfnuEZJGjeJhsZ3YiJBdqd6QC3PuOccXdYATnq1wa9+ne2Rpm ah3SFmj7IXfc8NkTcEP2mtNiDIP4tLYgixtdf0A== X-Gm-Gg: ASbGncuCIMlA7/lgG+1VIDQp7aAb116UqR7sJ98I55ltULFN8xPEsYkc+CrZh2EVqpq 1WJBxzW9lRAHeCxIxPDxMDVlGVT+67aGt3ZGjo3K2IqP30dD66PhqBMBZE1qdrmHktYQN3x+/1h +vlhJUzTyuyvDfMV4z10/WF5lYzXxxFVKCvf5KVw== X-Google-Smtp-Source: AGHT+IHnQ1OE9va7ibpLsQ6HsGu5nAKwMqnMByWYHfNIX6ZpPvctWflEVhCdOLiIZNZMMOT49s1jbrFSV6OW9MKb7Yk= X-Received: by 2002:ac8:690f:0:b0:476:8f41:7b8a with SMTP id d75a77b69052e-4771dd80272mr255452811cf.15.1742941394787; Tue, 25 Mar 2025 15:23:14 -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> <044E7A8E-B79D-44DB-B572-102A80CDFC3C@automattic.com> In-Reply-To: Date: Tue, 25 Mar 2025 23:23:03 +0100 X-Gm-Features: AQ5f1JqGzMQ6aRhvbR6wiVi6JhXMT4DpI-IRegz223lKhqlcKhlwYMtFMmwP1ss Message-ID: Subject: Re: [PHP-DEV] [RFC] [Discussion] Add WHATWG compliant URL parsing API To: Dennis Snell Cc: Internals Content-Type: multipart/alternative; boundary="000000000000b360a00631322a55" From: kocsismate90@gmail.com (=?UTF-8?B?TcOhdMOpIEtvY3Npcw==?=) --000000000000b360a00631322a55 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Dennis, I am myself also a bit lost on the countless names that I tried out in the > implementation, but I think I had toHumanFriendlyString() and > toDisplayFriendlyString() methods at some point. These then ended up bein= g > toString() and toDisplayString() after some iterations. I would be ok wit= h > renaming getHost() and toString() so that their names suggest they don't > use IDNA, but I'd clearly need a good enough suggestion, since neither > "MachineFriendly", nor "NonDisplayable" sound like the best alternative f= or > me. I was also considering using getIdnaHost() and toIdnaString(), but I > realized these are the worst looking names I have come up with so far. > What about getPunycodeHost(), getUnicodeHost(), toPunycodeString(), toUnicodeString()? Or getAsciiHost() and toAsciiString() may also work. These are the best names I managed to come up with so far. In the meantime, I renamed RFC 3986's toString() methods too according to another suggestion: - toString() became toRawString() - toNormalizedString() became toString() The new names mirror exactly what their getter counterparts do. M=C3=A1t=C3=A9 > --000000000000b360a00631322a55 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Dennis,

= I am myself also a bit lost on the countless names that I tried out in the = implementation, but I think I had toHumanFriendlyString() and toDisplayFrie= ndlyString() methods at some point. These then ended up being toString() an= d toDisplayString() after some iterations. I would be ok with renaming getH= ost() and toString() so=C2=A0that their names suggest they don't use ID= NA,=C2=A0but I'd clearly need a good enough=C2=A0suggestion, since neit= her "MachineFriendly", nor "NonDisplayable" sound like = the best alternative for me. I was also considering using getIdnaHost() and= toIdnaString(), but I realized these are the worst looking names I have co= me up with so=C2=A0far.

W= hat about getPunycodeHost(), getUnicodeHost(), toPunycodeString(), toUnicod= eString()? Or getAsciiHost() and toAsciiString() may also work. These are t= he best names I managed to come up with so far.

In= the=C2=A0meantime, I renamed RFC 3986's toString() methods too accordi= ng to another suggestion:
- toString() became toRawString()
=
- toNormalizedString() became toString()

The = new names mirror exactly what their getter counterparts do.

<= /div>
M=C3=A1t=C3=A9=C2=A0
--000000000000b360a00631322a55--