fork(2) download
  1. <?php
  2. $date = new DateTime('now');
  3. $date->modify('last day of this month');
  4. echo $date->format('d'); // somente o dia
  5. echo PHP_EOL;
  6. echo $date->format('d/m'); //dia e mês
  7. echo PHP_EOL;
  8. echo $date->format('d/m/Y'); //dia mês e ano
  9.  
Success #stdin #stdout 0.01s 20568KB
stdin
Standard input is empty
stdout
31
31/10
31/10/2014