Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125132 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 1186A1A00BD for ; Fri, 23 Aug 2024 12:33:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1724416541; bh=epYRdR792thWmQe3qebZYWMvDof6shgrSE88dsMxAnI=; h=Date:From:To:Subject:In-Reply-To:References:From; b=E+J5bwo78kb2Qq2Qwb1exq9gyEwODayiIjOa6KGUFtv6yqoCRtJxiksX0MfonRuAZ jgVvznvjdCoSjKBPC+n19y4oK2NxaEKs8z5YqKuQcb+C4akExklqxMbX2EG7okDFwV ZBIVLdlH74CHPlLlG9oJK1ovCGkdwUewWVvWmF+HH8bYJejbWAtpto/IHFE78JFO4n Yk1QaZNrHJbvVNlkXAHCQo+8lViOsprHWmuKNtstKpEkiyevbxyrW5Zo3vAnoepogf ijUUxxoXUJW+eiRQssNVj4TGj1FxtGDekEY6oq1dVM6BxXNWw+0oqFAluPT++AJydx 4yDjgY3Ty+egw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id CFA9118004A for ; Fri, 23 Aug 2024 12:35:40 +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.1 required=5.0 tests=BAYES_50,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 fhigh4-smtp.messagingengine.com (fhigh4-smtp.messagingengine.com [103.168.172.155]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 23 Aug 2024 12:35:40 +0000 (UTC) Received: from phl-compute-06.internal (phl-compute-06.nyi.internal [10.202.2.46]) by mailfhigh.nyi.internal (Postfix) with ESMTP id E5EDD1150D5F for ; Fri, 23 Aug 2024 08:33:48 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Fri, 23 Aug 2024 08:33:48 -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=1724416428; x=1724502828; bh=epYRdR792thWmQe3qebZYWMvDof6shgrSE88dsMxAnI=; b= dGwYrK5EEwPyZ+Ld3mPKc1Bujf57lr2q1JUKmddFCYu1uGY9ffRPlrDam2SfIvKT fX3ErelTYm4WJNbePAB4Pjs0kK8hLkKE4r4NEHAQUSbOxvaQt+YkrbTmz6AXdfAN WZ1bXVVEGu3jOAJ3EI7bS7ibjyE3O+3oS2fBrA6PXhaS6LGyKat85tmJlHeOqrVm Gk6RiUDsL0M7lKDIcYsbn1sFtPRQM9cFrrmc/RFrqRFsli5mZec8QQiXdYWjSU8A WZFdVwaR4R5g49gt7IgnMXkV4XUBu72cLWvM9YR30ddFItlNndB8VNdpy90ElppT qA0A1kc5RJmf5suSvStqWw== 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-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1724416428; x= 1724502828; bh=epYRdR792thWmQe3qebZYWMvDof6shgrSE88dsMxAnI=; b=C g4VekyKDjzB/bCeGnZ32lpnv/zl/xqWlO8YJjMv8KxuoAKLaJWp7S85wdLlNSb3F +/PU1YnjpzF3hBIx8DAqu4tfmcyCsAKz69E0/McD4utdjcZTuK8zjjr6oyy8IPlk n0WM3zzdOk5fijzjBc54PSgd9pA2HHfCVKIwaEEQrWO3y4yrv4q5hb8bFETap64V s+L4KRmPTKfum2brGBN0r1LCggJnMdRBJi1BOwav0xo9j6MVCg5knGSD0iW6BMQv 7DN7PjwBKbiBpFLX8D+5nR5bfq384DK1rkf6hfmOOGugu/xJPBV4mPDbQbsbJw4I HpDTA5ZgU/jNqS42QDpXw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddruddvvddgheegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuf gfjghfkfggtgfgsehtqhhmtddtreejnecuhfhrohhmpedftfhofigrnhcuvfhomhhmihhn shculgfkoffuohfrngdfuceoihhmshhophdrphhhphesrhifvggtrdgtohdruhhkqeenuc ggtffrrghtthgvrhhnpedukeelveehhffhteektddujeelvdduiefhffefhfdvveekgfdt heeugfejfeevgfenucffohhmrghinhepvgigrghmphhlvgdrtghomhenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehimhhsohhprdhphhhpsehr figvtgdrtghordhukhdpnhgspghrtghpthhtohepuddpmhhouggvpehsmhhtphhouhhtpd hrtghpthhtohepihhnthgvrhhnrghlsheslhhishhtshdrphhhphdrnhgvth X-ME-Proxy: Feedback-ID: id5114917:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Fri, 23 Aug 2024 08:33:48 -0400 (EDT) Date: Fri, 23 Aug 2024 13:33:45 +0100 To: internals@lists.php.net Subject: =?US-ASCII?Q?Re=3A_=5BPHP-DEV=5D_=5BConcept=5D_Flip_relative_fu?= =?US-ASCII?Q?nction_lookup_order_=28global=2C_then_local=29?= User-Agent: K-9 Mail for Android In-Reply-To: <86C995C8-AFF0-4E4B-8385-69BC701B887E@newclarity.net> References: <846D7756-712B-4A7C-9FC6-DB9F858836B8@rwec.co.uk> <838adce3-12da-49f3-88f2-883d63e93e89@app.fastmail.com> <86C995C8-AFF0-4E4B-8385-69BC701B887E@newclarity.net> Message-ID: <5BE5A0A9-BCB5-4E2B-8F11-1EDF49884BE1@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 23 August 2024 13:04:22 BST, Mike Schinkel wrot= e: > >> It wouldn't be a top-level namespace that would cause a conflict, but a= nested one: currently the above code resolves the function name as "AcmeCo= mponents\SplineReticulator\Utilities\Text\Text\strlen" (note the "=2E=2E=2E= \Text\Text\=2E=2E=2E")=2E > >How often does that really occur in the wild? =20 Oh, I think it would be much rarer than colliding with a global namespace= =2E I was pointing out that your suggestion was *better* than you thought= =2E >And how can it occur without an explicit `use AcmeComponents\SplineReticu= lator\Utilities\Text\Text` statement, which I proposed would override the a= utomatic `use`, anyway? I'm not sure what you mean=2E Right now, that's the function name that wou= ld be looked up for your example code (other than a couple of unrelated typ= os in your example)=2E So if, for some reason, someone was relying on that,= their code would break with your "automatic use"=2E >The only one of those that has a strong analog to existing PHP code is to= "use the end of the current namespace" as people frequently do with explic= it `use` statements=2E True=2E I just don't love the context-sensitive nature of it=2E >Lastly, no comment on `\\`? Ah, yes, I forgot to say: I'm not keen on that because in other contexts i= t means exactly the opposite: it refers to the absolute root in a context w= here a relative name would be assumed=2E For example, \\domain\username and \\server\fileshare on Windows, or //exa= mple=2Ecom/foo in a URL Rowan Tommins [IMSoP]