title: PHP - Using a string to get a constant?
body: <p>I don't believe this is possible. But it would be pretty neat if it were. At least I could't find anything online about it, so I thought I'd ask here. </p>
  
  <p>So we're using constants</p>
  
  <pre><code>cst_internalc::prefs_show_sidebar;
  cst_internalc::prefs_days_remain;
  cst_internalc::prefs_days_expire;
  </code></pre>
  
  <p>etc... </p>
  
  <p>Basically, I'm trying to get a hold of these constants using a string. </p>
  
  <p>so something like...</p>
  
  <pre><code>$string = sprintf('cst_internalc::prefs_%s', 'days_remain');
  </code></pre>
  
  <p>and then using that generated string to get the <code>cst_internalc::prefs_days_remain</code> constant. </p>
  
  <p>Is something like this at all possible? </p>
  
  <p>Thanks!</p>