Re: [PHP-DEV] 'Global' variable scope.

2001-06-30 Thread Zeev Suraski
That's simply not the way things work. Local variables are local to the context of the function that declared them, and are not supposed to be accessible from any other context, including that of nested function calls (that's how most languages behave). At 14:01 29/6/2001, John Parker wrote:

Re: [PHP-DEV] 'Global' variable scope.

2001-06-30 Thread Cynic
because it's not global. global variables are those not defined within any function, method, or object. and please, ask further questions like this in php-general@ At 13:01 6/29/2001, John Parker wrote the following: -- >Hi, all. > >I'm

[PHP-DEV] 'Global' variable scope.

2001-06-29 Thread John Parker
Hi, all. I'm just wondering why a variable defined within a function is not available as a global to functions called from the same scope. There's probably a really good reason for this, but I'm not sure I know what it is. Feel free to educate me. Ta muchly, JP. --- Code example follows ---