+ 1
What does it mean if something is defined or undefined?
Apparently the difference between variables and constants is one cannot be undefined. What does that mean?
1 Answer
+ 2
$var = 3; // initial value of the variable
$var = 5; // changing the value from 3 to 5
define("VAR", 20); // Defining Constant
VAR = 30; // it's not possible !!
// Once you define Constant, you cannot change its value anymore.
// Changing/overwriting the value of the variable is possible. That's the difference.