title: PHP - define constant inside a class
body: <p>How can I define a constant inside a class, and make it so it's visible only when called in a class context?</p>
  
  <p>....something like <code>Foo::app()-&gt;MYCONSTANT;</code></p>
  
  <p>(and if called like <code>MYCONSTANT</code> to be ignored)</p>