xploita Posted April 27, 2007 Share Posted April 27, 2007 why do applications store the settings in variables instead of constants? constants should be alot more safer,and settings like DEBUG or SITE_URL or PATH are changed only during installation or another major change in the app or system. i.e i can have a settings file with this: define('DEBUG',true); later i can check: if (defined('DEBUG')) { //print debug information } Link to comment https://forums.phpfreaks.com/topic/49009-why-variables/ Share on other sites More sharing options...
per1os Posted April 27, 2007 Share Posted April 27, 2007 Because coding has always been user-preference. A person likes to do stuff with variables as another likes to use constants. Just how it is, no reasoning for it. Just as long as it all works. Link to comment https://forums.phpfreaks.com/topic/49009-why-variables/#findComment-240055 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.