fork download
  1. <?php
  2.  
  3. $termina = new \DateTime('2050-12-11 11:14:15');
  4. $hoje = new \DateTime();
  5.  
  6. $intervalo = $hoje->diff($termina);
  7.  
  8. printf('%04d/%02d/%02d %02d:%02d:%02d', $intervalo->y, $intervalo->m, $intervalo->d, $intervalo->h, $intervalo->i, $intervalo->s);
Success #stdin #stdout 0.03s 23764KB
stdin
Standard input is empty
stdout
0032/04/20 15:15:28