title: How to calculation this time (php session)
body: <pre><code>session_start();
  
  $_SESSION['start1']= new DateTime('now');
  
  $_SESSION['start2']= new DateTime('now +10 minute');
  
  $_SESSION['time1'] = $_SESSION['start2']-&gt;diff($_SESSION['start1']);
  
  $_SESSION['start3']= new DateTime('now +20 minute');
  
  $_SESSION['start4']= new DateTime('now +30 minute');
  
  $_SESSION['time2'] = $_SESSION['start3']-&gt;diff($_SESSION['start4']);
  
  $_SESSION['alltime']=$_SESSION['time1']+$_SESSION['time1'];
  
  echo $_SESSION['alltime']-&gt;format('%I minute %S second');
  </code></pre>
  
  <p>But not show time?</p>