Jump to content

why variables!


xploita

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.