fork(1) download
  1. <?php
  2.  
  3. for ($i=1; $i<=12; $i++) {
  4.  
  5. $funcao = new DateTime("2018-".$i);
  6.  
  7. $numDias = $funcao->format('t');
  8.  
  9. echo $numDias."\n";
  10.  
  11. }
Success #stdin #stdout 0.02s 24080KB
stdin
Standard input is empty
stdout
31
28
31
30
31
30
31
31
30
31
30
31