[thelist] PHP variable scoping

deboute benjamin deboute at nerdsoul.com
Tue Aug 22 12:02:21 CDT 2000


At 12:13 22/08/00 -0400, you wrote:

>I'm getting beat up and bruised today by PHP. Mainly due to variable
>scoping. Can some one point me towards some nice (short) docs on the subject
>- or rattle off the 5 golden rules, or something ...
>
>help?

humpf...

php4 seems rather on variable scoping, especially it does some quirks when you include a lot of files that include a lot of files............adlib.

however ::
outside a function a variable is global.

inside a function a variable is local.

you can call/set a global variable in a function by using GLOBAL $variable

help resolved ?







More information about the thelist mailing list