fork(2) download
  1. <?php
  2.  
  3. $date1 = new DateTime("06/05/15 08:34:32");
  4. $date2 = new DateTime("07/05/15 10:15:57");
  5.  
  6. $interval = $date1->diff($date2);
  7.  
  8. var_dump($interval->format("%m mois, %d jours, %h heures, %i minutes, %s secondes"));
Success #stdin #stdout 0.02s 24400KB
stdin
Standard input is empty
stdout
string(50) "1 mois, 0 jours, 1 heures, 41 minutes, 25 secondes"