title: PHP Class constant with php function constant giving warning
body: <p>I have a constants I want to return by a function like this:</p>
  
  <pre><code>public function getConst($const)
  {
      $const = constant("Client::{$const}");
      return $const;
  }
  </code></pre>
  
  <p>But this is giving me an error:</p>
  
  <pre><code>constant(): Couldn't find constant Client::QUERY_SELECT
  </code></pre>
  
  <p>This however, does work:</p>
  
  <pre><code>public function getConst($const)
  {
      return Client::QUERY_SELECT;
  }
  </code></pre>
  
  <p>Why not?</p>