title: Get all constants from class
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/956401/can-i-get-consts-defined-on-a-php-class">Can I get CONST&#39;s defined on a PHP class?</a>  </p>
  </blockquote>
  
  
  
  <p>Is it possible to fetch all defined constants from class ?
  I.e. I have following class:</p>
  
  <pre><code>class Cl {
      const AAA = 1;
      const BBB = 2;
  }
  </code></pre>
  
  <p>and I would like to get an array:</p>
  
  <pre><code>array (
      'AAA' =&gt; 1,
      'BBB' =&gt; 2,
  )
  </code></pre>