Topic: Constants vs Variables
I've read up on constants today and my first q is; why?
What can a constant do that a variable can not?
Some of the stuff i (think i) have come up with so far:
Constant is global by defaul, variable is not unless you $GLOBALS['variable'].
Constants can not be overridden, ie you can not name a constant the same in two different parts of the script (due to their globalness?), meanwhile variables can be overridden.
You can get a list of all defined constants, as with variables you can not (unless $GLOBALS can be used?)
EDIT: I cant find a way to undefine constants...Is there one?
What scope of usage do constants deserve?
Only tru variables that is used throughout the site/app like Directory-locations, hostinfo for db's etc etc.
So, folks, why sould i use or not use constants, and most importantly, for what should constants be used for?