fork(1) download
  1. <?php
  2. $dbDate = '2017-11-27 20:00:00';
  3. $dbDate = new DateTime($dbDate);
  4. $aDate = new DateTime(date('Y-m-d H:i:s'));
  5. $timePassed = $dbDate->diff($aDate);
  6. $minutes = $timePassed->days * 24 * 60;
  7. $minutes += $timePassed->h * 60;
  8. $minutes += $timePassed->i;
  9. echo $minutes;
Success #stdin #stdout 0.01s 83904KB
stdin
Standard input is empty
stdout
250