Will it work as GLOBAL variable throughout my session?
With common sense of the term “session” - no.
Dunno what you mean under GLOBAL variable though. Cause GLOBAL variables aren’t accessible throughout session too, but only SESSION variables are.
what if I define a constant into a function, will it scope to be limited to that function only? or throughout the script it’ll maintain it’s assigned value?