fork download
  1. <?php
  2.  
  3. $mhoje = date("M");
  4.  
  5. var_dump(date('d/m/Y', strtotime('last day of previous month')));
  6.  
  7. $m1 = date('M', strtotime('last day of previous month'));
  8. $em1 = ucfirst(strftime('%b', strtotime($m1)));
  9.  
  10. echo "$mhoje / $m1 / $em1";
Success #stdin #stdout 0.02s 26368KB
stdin
Standard input is empty
stdout
string(10) "30/04/2021"
May / Apr / May