AW: AW: [STANDARDS] Documenting strange include behaviour

From: Date: Fri, 21 Nov 2014 09:20:24 +0000
Subject: AW: AW: [STANDARDS] Documenting strange include behaviour
References: 1 2 3 4 5  Groups: php.standards 
Request: Send a blank email to standards-+get-571@lists.php.net to get a copy of this message
Hi Stas > -----Ursprüngliche Nachricht----- > Von: Stanislav Malyshev [mailto:smalyshev@gmail.com] > Gesendet: Donnerstag, 20. November 2014 18:19 > An: Robert Stoll; 'Rowan Collins'; standards@lists.php.net > Betreff: Re: AW: [STANDARDS] Documenting strange include behaviour > > Hi! > > > I see some misconception here. I always thought variables defined in a > > namespace scope are only available in this specific namespace and > > PHP has a bunch of scopes, which work independently (the spec has a section on it). Variable > scope and namespace scope > are independent, for example. > > > not in others. But yeah, they are global and thus available in all > > namespaces (shame on me ^^). My fault, sorry for the confusion. > > Nevertheless, I'll write down some clarifications on what happens with > > global variables when they are included in a function or class > > I think this is already covered by variable scope description and mentioning in include chapter > that includes have the same > variable scope as the inclusion operator (in 10-expressions). > I already created a pull request which tries to improve the spec on this specific point: https://github.com/php/php-langspec/pull/89 Cheers, Robert

« previous php.standards (#571) next »