title: php getdate() vs date()
body: <p>Theoretical question.</p>
  
  <p>Imagine the situation. I need to get today date and time (not now, but today - the start of the day). I can do it with either this code:</p>
  
  <pre><code>$now = time();
  $today = date('Y-m-d H:i:s', mktime(0, 0, 0, date("m", $now), date("d", $now), date("Y", $now)));
  </code></pre>
  
  <p>or this:</p>
  
  <pre><code>$now = getdate();
  $today = date('Y-m-d H:i:s', mktime(0, 0, 0, $now['mon'], $now['mday'], $now['year']));
  </code></pre>
  
  <p>In most examples I've seen, the first way is used. The question is simple: why? The first one uses 3 function calls more to get month, day and year.</p>