title: Defining class constant in PHP
body: <p>I would like to define a class constant using a concatenation of an existing constant and a string. I can't predefine it because only scalars are allowed for predefining constants, so I currently have it as part of my constructor with a defined() function checking if it is already defined. This solution works but my constant is now unnecessarily global. </p>
  
  <p>Is there a way to define a class constant at runtime in php?</p>
  
  <p>Thank you.</p>