title: Using defined constants to create objects
body: <p>Arbitrary PHP question, more/less out of curiosity. I apologize if this is a silly question.</p>
  
  <pre><code>$class  = 'ClassName';
  $object = new $class();
  </code></pre>
  
  <p>or </p>
  
  <pre><code>$object = $class::functionName();
  </code></pre>
  
  <p>This obviously works.</p>
  
  <pre><code>define(CLASS, 'ClassName');
  $object = new CLASS();
  </code></pre>
  
  <p>or</p>
  
  <pre><code>$object = CLASS::functionName();
  </code></pre>
  
  <p>This does not work. </p>
  
  <p>Just wondering if it is at all possible to use defined constants to create new objects. If not, I definitely understand why.</p>