Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124724 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 87E0C1A00B7 for ; Fri, 2 Aug 2024 18:46:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1722624471; bh=bkFcNwPNJbF8oZTDIhUDD+T+yYkMDeW2gAaScP/61yA=; h=Subject:From:To:Date:In-Reply-To:References:From; b=B77/llvUP7IDJph2kMJ83U+Kw8P2fG56n+DohTlPaOzHwVH3vpJ3XIWgcYKHJsxcG zCbO7fPkaaPEajo9i/gtVS4PycI8vQ1sSOuWNw9KzSkxjzaznmhtKi99kq1QfWA/Nm FnJ4APqhIZbMED6QpIFPEmfkgfZS3kUZCySQK903usbMQmbvW4rLoS3hrLlYmO8p/b YCucOq/1XA9m2/DuorL7Bs70kPjI8jIS0/7h8fufBy4Fciu/GkpUua4XNaAaWaNhQb eiDceqAqaF7YRb62h4HV3+w+Wai/w8s2igZA94GCVLV0jPjCEHfZqf8HO9Bzqyf/BC HYQKqtBvrmzjQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2F1D318005C for ; Fri, 2 Aug 2024 18:47:50 +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.2 required=5.0 tests=BAYES_40,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, 2 Aug 2024 18:47:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ageofdream.com; s=ageofdream; t=1722624363; bh=bkFcNwPNJbF8oZTDIhUDD+T+yYkMDeW2gAaScP/61yA=; h=Subject:From:To:Date:In-Reply-To:References:From; b=Wgx59RUYIJln+xRRZfKT3pEbDUyxfd2WW3umSNVxbd+2c5kWq4JCaPp99LsLCGMvi Oewu6lLO2SQh7Uj7mAjn6osNNUDpZY+DjjOwDTp8Vcrx53fVBWO/YOrZo/n2MUMrad aKfYe+UNIpAJaEMVYOtiuFd4RZge+cxIvgRTwv4KXRs8iGvOzWMNl2jHOeiBp+Dbyg xzG8kNKditG7jOf52gsJ5yMeZd47G4M0htjJAgpIk1dKBiPgdg2rVl0HQz+3+S81fP kgqBZ4XUWQTUKGEzw4FfSfMuewCJ89djy3HWqRzNmubG8FafCCqGaOSghtuDBtNl3U J/C1lYr7VUuwA== Received: from [192.168.1.7] (unknown [72.255.193.122]) by ageofdream.com (Postfix) with ESMTPSA id CB80F2746E for ; Fri, 2 Aug 2024 14:46:03 -0400 (EDT) Message-ID: Subject: Re: [PHP-DEV] [Concept] Flip relative function lookup order (global, then local) To: internals@lists.php.net Date: Fri, 02 Aug 2024 14:46:03 -0400 In-Reply-To: <6F2E44FA-4E00-47F9-BD56-5051385E3673@rwec.co.uk> References: <6F2E44FA-4E00-47F9-BD56-5051385E3673@rwec.co.uk> 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) On Fri, 2024-08-02 at 18:53 +0100, Rowan Tommins [IMSoP] wrote: >=20 >=20 > On 2 August 2024 18:19:41 BST, Nick Lockheart > wrote: > > I had suggested a per-file directive in a post to this list a while > > back. Something like: > >=20 > > namespace foo; > > use global functions; >=20 > There was a proposal for exactly this a few years ago, which ended up > in an RFC with a slightly different syntax (using a declare() > statement), but was declined in voting by 35 votes to 2. >=20 > I can't remember much about the discussion, so am not sure what > changes would make a new attempt more likely to pass. >=20 > Regards, > Rowan Tommins > [IMSoP] In all likelihood, it was the syntax that was disfavored. What about an RFC where we vote on if the feature should exist, without any syntax? ie. "Should there be a way for developers to signal to the parser that all functions should be treated as global and skip NS lookup, and use dedicated opcodes? The specific syntax would be decided in a different RFC/vote if this one passes." Yes: We should do this, let's discuss syntax possibilities. No: This should not be a feature at all.