ColdFusion variables scope precedence ordering.
Description:-
If you use a variable name without a scope prefix, ColdFusion checks the scopes in the following order to find the variable.
ColdFusion searches variables in the below list order when you do not specify the scope, you can improve performance by defining the scope for all variables.
Sequence | Scope Name |
1 | Local (function-local, UDFs, and CFCs only) |
2 | Arguments |
3 | Thread local (inside threads only) |
4 | Query (not a true scope; variables in query loops) |
5 | Thread |
6 | Variables |
7 | CGI |
8 | Cffile |
9 | URL |
10 | Form |
11 | Cookie |
12 | Client |