Tutorial by Topics: global

Superglobals are built-in variables that are always available in all scopes.

Several predefined variables in PHP are "superglobals", which means they are available in all scopes throughout a script. There is no need to do global $variable; to access them within functions or methods.

In this topic I would like to mention all possible global variables which can be used in Apex code. Like [UserInfo Class][1]. I suggest we just list a global classes/variables and links. If you know about a global class/variable but can't find a documentation, please provide as much information as possible. [1]: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_userinfo.htm

By default, every variable in bash is global to every function, script and even the outside shell if you are declaring your variables inside a script.

If you want your variable to be local to a function, you can use local to have that variable a new variable that is independent to the global scope and whose value will only be accessible inside that function.

:vglobal or :v is the opposite of :global or :g that operates on lines not matching the specified pattern (inverse).

Page 1 of 1