Re: Class/function scope general question
| From: | Edward Vermillion | Date: | Fri, 12 May 2006 18:24:38 +0000 |
| Subject: | Re: Class/function scope general question | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-236079@lists.php.net to get a copy of this message | ||
On May 12, 2006, at 1:09 PM, Martin Alterisio wrote:
[snip] When you call a function in the global scope from inside a member function you're leaving the object scope, that's why this is null in the global functionBut my thought is that since the include was from inside the member function that the included function would be in the scope of the member function, and not global. (?) So if I have: class foo { function bar() { function baz(){} } } Would baz() be out of class scope here? Or are includes automatically global no matter where they are called? Or is it the convoluted manner in which I'm getting to baz() that's causing this? Thanks! Ed