Static variables
If I write something like
PHP Code:
|
Re: Static variables
Static variables are just like global variables,but with a local scope.Once you assign something to them, it will stay there until you do it again.
|
Re: Static variables
I guess a better question would be whether it's possible for client_connect (in this case) to be called again before the first call is finished, thus overwriting authid.
|
Re: Static variables
Quote:
|
Re: Static variables
Ok thank you.
|
Re: Static variables
You by the way cannot return authid in client_connect.(id)
The earliest moment you can do so is client_authorized(id). |
Re: Static variables
It's also not necessarily worth it to use a static variable in this particular case as the forward isn't get called excessively nor is your variable of an excessive length.
If you ran a timing test, you wouldn't notice much of a difference, if any, unless you ran it an absurd number of times. |
Re: Static variables
It was just an example; I was more interested in other cases, but thanks for the extra tips.
|
Re: Static variables
|
| All times are GMT -4. The time now is 03:07. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.