Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:106303 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 43633 invoked from network); 28 Jul 2019 01:29:35 -0000 Received: from unknown (HELO localhost.localdomain) (76.75.200.58) by pb1.pair.com with SMTP; 28 Jul 2019 01:29:35 -0000 To: internals@lists.php.net References: Date: Sat, 27 Jul 2019 23:53:52 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Posted-By: 5.69.56.51 Subject: Re: [PHP-DEV] Re: [RFC] Namespace-scoped declares, again From: markyr@gmail.com (Mark Randall) Message-ID: On 27/07/2019 09:33, Rasmus Schultz wrote: > On Thu, Jul 25, 2019 at 3:34 PM Nikita Popov wrote: >> Based on the received feedback, I plan to change this proposal from being >> "namespace-scoped" to being "directory-scoped" instead Personally I'm not a huge fan of using implicit hierarchical directories for managing defines. It's certainly better than global state functions, but in general I don't feel comfortable with the idea that an arbitrary file can effect the behaviour of the VM for particular files that does not directly reference it. Obviously there's lots of functions that do that, set_error_handler etc, but I think it is best avoided wherever possible. I think what the situation calls for is the PHP equivalent of #include - we need to be able to explicitly import the definitions from another file. ====== MyProject\Models\Test\SomeClass.php ======= ```