Re: AW: [STANDARDS] Documenting strange include behaviour

From: Date: Thu, 20 Nov 2014 17:18:42 +0000
Subject: Re: AW: [STANDARDS] Documenting strange include behaviour
References: 1 2 3 4  Groups: php.standards 
Request: Send a blank email to standards-+get-570@lists.php.net to get a copy of this message
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). -- Stas Malyshev smalyshev@gmail.com

« previous php.standards (#570) next »