Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125144 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 677FD1A00BD for ; Fri, 23 Aug 2024 14:04:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1724422005; bh=fH+/IFyRLkF/1zd+GW/8msIRGEea+UipljRpZh4+aXc=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=E/LaoI5lSIpqFHNUril3VomW/xKAmSuDVC0ldii4+XqXnk8XzewrlEYM+xbVIbwBQ km70ERUG+D1tuPSkc7Vzx6wkmqpzy42ApxGwKCBUZe61BuGjHZjgTXXUf0+E4dNeNf QLsiVQTpaZP3XpccturiWl9UEiMAHRYrukrfwwExzUqHT/OM2DX0Wf/x+CWm/fCHHZ BJsfoB07rMiTEowst2Hlcg+IaYBJdRckRIgM7sVbZ2MB0iNci23fRwDxGJsKySYyul Ij0n5LjXapeCpnDSdR+OVIneJdmASnAf5qI1ZnRmyVzKzRbM702B0Gs8fFgFDpB8T+ yDfi+t2+GnfRA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 50C6B180034 for ; Fri, 23 Aug 2024 14:06:44 +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.8 required=5.0 tests=BAYES_50,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 mail1.25mail.st (mail1.25mail.st [206.123.115.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 23 Aug 2024 14:06:43 +0000 (UTC) Received: from smtpclient.apple (unknown [49.48.221.224]) by mail1.25mail.st (Postfix) with ESMTPSA id C6EC1604C3; Fri, 23 Aug 2024 14:04:46 +0000 (UTC) Content-Type: text/plain; charset=us-ascii 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 \(3776.700.51\)) Subject: Re: [PHP-DEV] [Concept] Flip relative function lookup order (global, then local) In-Reply-To: <0d269a38-28fe-494c-a903-50022e09f27b@app.fastmail.com> Date: Fri, 23 Aug 2024 21:04:32 +0700 Cc: PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: References: <21D6F160-5EAE-44FA-907B-E1DAAC1B8D75@rwec.co.uk> <53BD062A-4D7F-4E5D-852E-6D27641213A8@koalephant.com> <7607FD64-5572-466E-9866-63C2536B2A09@koalephant.com> <0d269a38-28fe-494c-a903-50022e09f27b@app.fastmail.com> To: "Rowan Tommins [IMSoP]" X-Mailer: Apple Mail (2.3776.700.51) From: php-lists@koalephant.com (Stephen Reay) > On 23 Aug 2024, at 20:20, Rowan Tommins [IMSoP] = wrote: >=20 > On Fri, 23 Aug 2024, at 13:43, Stephen Reay wrote: >> This change would also break existing code that does "the right = thing",=20 >> and has the potential to arbitrarily break perfectly valid userland=20= >> code *any time a new global function is added*, forever. >=20 > You replied to me, but you seem to be commenting on one of the other = proposals. My preference is for "unqualified =3D global", which is a = one-off breaking change, which only affects user-defined functions, = which are declared in a namespace, and used in that same namespace. >=20 > You're right that it would mean classes and functions resolve = differently, and that's why I said that if I had a time machine, I would = support a different option. But, personally, I don't think the small = long-term inconsistency outweighs the huge short-term disruption of = defaulting to local. >=20 > Regards, > --=20 > Rowan Tommins > [IMSoP] >=20 Ok well I apologise, I thought you were proposing whatever "current = namespace" syntax solution as optional, rather required. I stand by the rest of my argument though. This entire ridiculous = discussion about a huge BC break that introduces bizarre = inconsistencies, is 100% because a handful of people don't want to type = `\`. Are we going to go through this whole ridiculous dance for classes and = interfaces and traits next too? They always need to be prepended with = `\` (or imported), so I can't begin to imagine what horrors that must be = presenting for those poor souls who are allergic to a leading backslash. Perhaps next we can go back to having register_globals and forcing it to = always on, because people don't want to type $_GET or $_POST. Perhaps = after that we can bring back magic quotes because parameterised queries = are too much to type?