As with all
use
directives, defining a constant happens at compile time. Thus, it's probably not correct to put a constant declaration inside of a conditional statement (like if ($foo) { use constant ... }
).Constants defined using this module cannot be interpolated into strings like variables. However, concatenation works just fine: