I know to define a constant, you do something like this
define("CONSTANT", "Hello world.");
if I want to change the value of the constant I would have to do define() again? Why couldn’t I just do CONSTANT = "whatever"; after it has already been defined the first time?
The whole point of a constant is that it is constantly and always the same. You can not change a constant after you defined it.
Even using
define("CONSTANT", "Hello world.");would return an error.I just did it real fast to show you what you’d get: