title: PHP const not working?
body: <p>My class looks similar to this:</p>
  
  <pre><code>class Foo {
      const UNKNOWN = 2;
  
      public function doStuff($var) {
          if($var==UNKNOWN) {
              echo "Unknown state";
              return;
          }
          // other stuff
      }
  }
  </code></pre>
  
  <p>However, I'm getting this error in <code>doStuff()</code>:</p>
  
  <blockquote>
    <p>Use of undefined constant UNKNOWN - assumed 'UNKNOWN'</p>
  </blockquote>
  
  <p>What am I doing wrong? Can't I define custom constants?</p>