The global variable is declared with $ prepended. It has full scope in the application. These variables can be used anywhere within an application.
For Example:
$departmentName = “Operations”
Proper care is to be taken when using global variables, as they can also be changed from anywhere within the application, which leads to bug tracking later. This process can make the bug tracking more difficult.