8.9 Variable Initialization | |
When a script starts, the initial values for global variables come from one of several sources, in order of precedence:
These sources are checked in order, from first to last: the first source that has values for a given variable will be used. Only values from this first (highest precedence) source will be used to initialize the global variable. If none of these sources has a value for the variable, it has no initial values.
Because of this ordering, lower-precedence values cannot override higher ones when more than one source has values for the same variable. For example, a sensitive environment variable like $REMOTE_ADDR will not be overridden by a query-string variable of the same name. This helps prevent (un)intentional manipulation of a script's variables by the Web client: more "trusted" sources are used before less "trusted" ones.
(This precedence ordering can be altered in <EXPORT> variables by using the USEROK flag; see the manual on <EXPORT> .)
Back: Variable Types | Next: Functions |