Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125105 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 EA7E21A00BD for ; Fri, 23 Aug 2024 00:42:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1724373871; bh=NtHLDzvuBm3rVqic9dQUFXDtTW5ruCgzlrdSUL0KxF4=; h=Subject:From:To:Date:In-Reply-To:References:From; b=IMgOjvFB0WD1Jsf0zTrLIZDnrqMGmuKoN0a7ySHlf7oJD198I+p0om5YmZcLxDaOJ UECECLdZYc2lEp+UxIDVOPDrB4slsu3CdlZ8izqKB+slXVpS3WSXpjlLfxX6KaywUY Eb3nAwPErQ0N2VeGO0Iy9BTwgdvLH/Cl5aMTUi/RtEI+pW+ZhNYsU48ZFBMxqGctJK ilueuEaFkDLx53K7CiShQQCED0H3IQu2WB/U/Hr63QPf52xorzEMvzXrAUZ7Q9I73H 77CH6ghlEKtBwsPE6Sh9TE+f7rz5CnzpQ1qdEml717XKKG9D5JWWSo0Gj+RzSduthE q+j91Bvi1Ci4Q== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D56BF180055 for ; Fri, 23 Aug 2024 00:44:30 +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.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_PASS, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from ageofdream.com (ageofdream.com [45.33.21.21]) (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 ; Fri, 23 Aug 2024 00:44:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ageofdream.com; s=ageofdream; t=1724373758; bh=NtHLDzvuBm3rVqic9dQUFXDtTW5ruCgzlrdSUL0KxF4=; h=Subject:From:To:Date:In-Reply-To:References:From; b=sKlFRB/3LPLpvxKe6WqmUk0O/iAv+gJeTR4zQ666gbRSSox3b+hfpF7l+VneEC9la bwnCqODRcPXpvfeljel6IEiRV5ytYKIWyRxSvi9EtYS3bfOx/Ug2CCLnXdhEcO4HqJ ZLbTrvKuZgP6SURtuIA6WUXuS4tDfCRnM1Q3LDFfUbCIOs+8rA4OyaLFyrJPq2UaXR L3TkutJMMSM6l1z0VscnqSHPK5IilYaHU6xpsfmFPuSvGNXjG5X5yGXLvjRqBIeRyY O/K/pf8NxUvj+LvxmlPLGOy2ufztfhsYiUjga+vncUJuIu8GiyLC6t+7baSk5bdpxG WN4Ge985ZD8kw== Received: from [192.168.1.7] (unknown [72.255.193.122]) by ageofdream.com (Postfix) with ESMTPSA id 9C95C25095 for ; Thu, 22 Aug 2024 20:42:38 -0400 (EDT) Message-ID: Subject: Re: [PHP-DEV] [Concept] Flip relative function lookup order (global, then local) To: internals@lists.php.net Date: Thu, 22 Aug 2024 20:42:38 -0400 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4-2 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 From: lists@ageofdream.com (Nick Lockheart) >=20 > BUT, if people already complain about "\" being ugly, having to write > "namespace\" is going to make them REALLY grumpy... > So maybe at the same time (or, probably, in advance) we need to come > up with a nicer syntax for explicitly referencing the current > namespace. > Unfortunately, finding unused syntax is hard, which is why we have > "\" in the first place (and for the record, I think it works just > fine), but maybe something like "_\" could work? Giving us: > namespace Foo; > $native_length =3D strlen('hello'); # same as \strlen('hello') > =C2=A0$foo_length =3D _\strlen('hello'); #=C2=A0 same as \Foo\strlen('hel= lo') >=20 namespace foo using global functions; - or -=20 namespace foo using local functions; Tell PHP what you want at the per-file level.