PHP constants declaration based on condition
- by CM
I am using one separate file for all constants of my PHP application.
class constants
{
const USERNAME = 'abc';
........
........
}
For lets say USERNAME constant, value can be either xyz or abc based on file exists check. if xyz file exists USERNAME value would be xyz. How can I do this check in my constants class? Thanks in advance.