Types of variables in php:

1.Global Variable:

If we declare any variable outside of all functions comes under global variable. Global variable can be accessed from anywhere in the PHP Script.To access the global variables we have to use Array keyword or redeclare the global variable within the functions using GLOBAL keyword.

2.Local variable:

Variable declaration within the function comes under local variable. The scope of the local variable

3.Variable Variables:

A variable variable takes the value of a variable and treats that as the name of the variable.

4.Reference variable:

A reference variable is alias name of actual variables. Both reference and actual variables refers to the same location.

5.Static Variable:

A static variable can maintain the previous value. You can declare a variable to be static simply by placing the keyword STATIC in front of the variable name.

6.Super global variables:

A variable which we can access from any webpage within the application comes under super global variable. This super global variable is array datatype and php supports different types of super global variables.Those are: