Re: [RFC] Namespace-scoped declares, again

From: Date: Mon, 11 Dec 2017 15:46:34 +0000
Subject: Re: [RFC] Namespace-scoped declares, again
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-101324@lists.php.net to get a copy of this message
On Mon, Dec 11, 2017 at 8:43 AM, Nikita Popov <nikita.ppv@gmail.com> wrote: > Some time ago I introduced the following proposal for namespace-scoped > declares: > > https://wiki.php.net/rfc/namespace_scoped_declares > > The idea is to allow specifying declare directives for a whole library or > project using: > > namespace_declare('Vendor\Lib', ['strict_types' => 1]); > > I've finally gotten around to implementing this proposal ( > https://github.com/php/php-src/pull/2972) and would like to > move forward > with it. > Being lazy here because I'm literally on my way out the door and don't have a moment to parse through the implementation, but can you clarify how this impact compile-time declares? <?php require('a.php"); require('b.php"); // This file has a namespace declaration require('c.php"); In this example, does a.php wind up getting compiled with a different set of declares than b.php and c.php? -Sara

« previous php.internals (#101324) next »