title: Get the last day of the current year as date
body: <p>How can I get the last day (Dec 31) of the current year as a date using PHP?</p>
  
  <p>I tried the following but this doesn't work: </p>
  
  <pre><code>$year = date('Y');
  $yearEnd =  strtotime($year . '-12-31');
  </code></pre>
  
  <p>What I need is a date that looks like 2014-12-31 for the current year.</p>