title: Fatal error: Call to undefined method DateTime::diff()
body: <p>When my code is moved from local server to live server it shows an error like this :</p>
  
  <blockquote>
    <p>Fatal error: Call to undefined method DateTime::diff()</p>
  </blockquote>
  
  <p>Code:    </p>
  
  <pre><code>&lt;?php      
    date_default_timezone_set('Asia/Calcutta');
    $sFinalDate   = date('Y-m-d', strtotime($sDate));
    $sNow         = new DateTime();
    $iRemain      = new DateTime( $sFinalDate.$sTime);
    $iInterval    = $iRemain-&gt;diff($sNow);
    $sTimeCounter = $iInterval-&gt;format("%h: %i :%s ");
    $sCalculate   = $iInterval-&gt;format("%a:%h:%i");
  ?&gt;
  </code></pre>