Global variables and Constants, both are very much used in PHP applications.
We have already gone through the variable scopes in PHP, where we had learnt what a global variable is and how they function.
Constants once defined cannot be changed. However, global variables can be modified several times in a PHP page, such that, any subsequent access to the global variable gets the most recent modified value and not the one it got initialized with. So, the value of a global variable can keep changing as it goes along.
We use Constants in a PHP application as:
define("PI", "3.14"); //defining a constant
echo PI; //outputs 3.14