AW: AW: [STANDARDS] Documenting strange include behaviour

[email protected] ("Robert Stoll")
Newsgroups php.standards
Message-ID <[email protected]>
Hi Stas

> -----Ursprüngliche Nachricht-----
> Von: Stanislav Malyshev [mailto:[email protected]]
> Gesendet: Donnerstag, 20. November 2014 18:19
> An: Robert Stoll; 'Rowan Collins'; [email protected]
> 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
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.