"define vs variable in php" Answer’s


DEFINE makes a constant, and constants are global and can be used anywhere. They also cannot be redefined, which variables can be.

I normally use DEFINE for Configs because no one can mess with it after the fact, and I can check it anywhere without global-ling, making for easier checks.

Wednesday, March 31, 2021
answered 11 Months ago
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :