title: Get a constant value from a string in PHP
body: <p>I need to extract the value of a constant in PHP from a string.
  My example will explains it better than my words :)</p>
  
  <p>constants.php :</p>
  
  <pre><code>define('CONNECTION_FAILED', 'Connection Error');
  </code></pre>
  
  <p>index.php :</p>
  
  <pre><code>include_once 'constants.php';
  $success = $_GET['message']; //$success -&gt; "CONNECTION_FAILED"
  </code></pre>
  
  <p>Now what I want to do is to show the value of the constant with the name present on the $success variable.</p>
  
  <p>Do you know a way to do this simple thing ?</p>
  
  <p>Thank you in advance</p>