Reputation: 12727
Can a define be redefined in PHP?
e.g.
define("__root__", "/some/path");
Can the name __root__
be redefined?
Upvotes: 0
Views: 412
Reputation: 180917
http://php.net/manual/en/function.runkit-constant-redefine.php
It's there, just don't do it.
Upvotes: 3
Reputation: 5429
No, the idea of constants in PHP is that they can't be redefined. If you wan't to do this eventually you could use just variables or the $_GLOBALS
array.
Upvotes: 1