title: How to convert php enum to array?
body: <p>I've got the following enum:</p>
  
  <pre><code>abstract class DaysOfWeek
  {
      const Sunday = 0;
      const Monday = 1;
      // etc.
  }
  </code></pre>
  
  <p>How can I modify the following function to generate an array based on the <code>enum</code> above?</p>
  
  <pre><code>public function getOptions()
  {
      return [
          0 =&gt; 'Sunday',
          1 =&gt; 'Monday',
      ];
  }
  </code></pre>
  
  <p>Isn't it better to use <code>SplEnum</code> for this purpose? </p>