> Perhaps I'm missing something. In order to access the value of any
> variable defined outside the scope of the function, you have to declare
> it as "global". This is true in every single instance. If you do not,
then
> you cannot access the value of that variable. While it's been a while
> since I've worked with C, I seem to recall it being the case there as
> well. And in Pascal. And in VB. Again, it's been a while so I could be
> wrong (but don't think so).
Not realy. In most languages, heck , all I can think of, the variable's
scope is simply dependant on WHERE it was declared, not how it was declared.
If in C/C++ you define a variable outside the scope of any function, then it
becomes global and can be accessed by any function.
I'm not arguing one side or the other, just stating :) I personally find the
PHP way a bit annoiying, but its workable, and i'm SURE there was a reason
for it. Just not sure what that reason was :)
- John Vanderbeck
- Admin, GameDesign
>
> Chris
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]