title: PHP array_combine & range VS foreach loop to get array of numbers
body: <p>I have been thinking about this, for code readability I tend to use php built in functions like <code>range</code> &amp; <code>array_combine</code> to generate an array of numbers like this:</p>
  
  <pre><code>array(
     5 =&gt; 5,
     10 =&gt; 10,
     15 =&gt; 15,
     20 =&gt; 20,
     25 =&gt; 25,
     ...
     60 =&gt; 60
  );
  </code></pre>
  
  <p>So currently I use this to generate above: </p>
  
  <pre><code>$nums = range(5, 60, 5);
  $nums = array_combine($nums, $nums);
  </code></pre>
  
  <p>I was wondering if there is a speed or memory difference between above approach and simply using loop like this:</p>
  
  <pre><code>for ($i = 5; $i &lt;= 60; $i++) {
     $nums[$i] = $i;
  
     $i += 5;
  }
  </code></pre>
  
  <p>I just want to know if my approach is good practice or if someone who would look at my code would try to find out where I live?</p>