I would like to define a class constant using the concatenation of an existing constant and string. I cannot predefine it, because only scalars are allowed to predefine constants, so at the moment I have it as part of my constructor with a specific function (), if it is already defined. This solution works, but my constant is now overly global.
Is there a way to determine the class constant at runtime in php?
Thanks.
php constants
joshs
source share