Re: AW: [STANDARDS] Documenting strange include behaviour

[email protected] (Stanislav Malyshev)
Newsgroups php.standards
Message-ID <[email protected]>
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
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.