title: check if new DateTime is today or future in php
body: <p>I need to check if date1 is today or future date and if so its ok
  if not (is in the past) its not ok. i see a lot of examples but none of theme is check if date1 is equal today.
  my code is: </p>
  
  <pre><code>$today = new DateTime(); // Today
  $today-&gt;format('Y-m-d'); //2016-10-27
  $contractDateBegin = new DateTime($date1); //2016-10-27
  
  if($today-&gt;getTimestamp() &lt;= $contractDateBegin-&gt;getTimestamp()){
     echo 'OK';
  }
  else{
     echo "NOT OK";
  }
  </code></pre>
  
  <p>its work fine if date1 is a future date but if its the same date its echo "NOT OK"</p>
  
  <p>any help?</p>